I managed to install eclipse and debug that program in a windows machine. I can't get eclipse to work in my raspberry. I see it is a common problem.
I am already running
Code: Select all
java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) Server VM (build 25.251-b08, mixed mode)
i tried the solution given in this threat viewtopic.php?f=28&t=252708&p=1680061&h ... g#p1680061!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
I tried to change the java with:cd /usr/lib/eclipse/plugins
ln -s ../../../share/java/org.eclipse.osgi-3.9.1.jar org.eclipse.osgi_3.8.1.dist.jar
In addition it is required to specify the correct Java VM to use. The eclipse version only works with Java 8. There are plenty of links that can instruct how to install Java 8 . You can have multiple Java versions on your system so no need to replace or downgrade.
Specify the Java VM in eclipse.ini to point to a Java 1.8 version, in my case the one from Oracle but OpenJDK might also work.
Code: Select all
sudo nano /usr/lib/eclipse/eclipse.ini
Insert the -vm option before the -vmargs
Code: Select all
openFile
-vm
/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/bin/java
-vmargs
This is what worked for me.
Code: Select all
sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-11-openjdk-armhf/bin/java 1111 auto mode
* 1 /opt/jdk1.8.0_251/bin/java 1 manual mode
2 /usr/lib/jvm/java-11-openjdk-armhf/bin/java 1111 manual mode
3 /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java 1081 manual mode
Or a way to import it and compile it with Neatbeans?
Could i compile it from the windows machine and eclipse? if so, how? i already tried
Thanks, I am new to raspberry, :-/