Posts: 18
Joined: Sat Jul 04, 2020 12:10 am

cant get eclipse to start

Sat Jul 04, 2020 12:29 am

Hello, i am trying to do this project wich seems to be done with eclipse.

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 get this log from eclipse
!MESSAGE Exception launching the Eclipse Platform:
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(
at org.eclipse.equinox.launcher.Main.main(
i tried the solution given in this threat viewtopic.php?f=28&t=252708&p=1680061&h ... g#p1680061
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


This is what worked for me.
I tried to change the java with:

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

Is it there another solution to make it work?
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, :-/

User avatar
Posts: 535
Joined: Thu Oct 25, 2012 7:34 am

Re: cant get eclipse to start

Mon Jul 06, 2020 4:13 pm

I haven't got any success with Eclipse that was supplied with default OS... Version of Eclipse 3.8 is quite old (very, very old - it dates from 2012) and I failed to even compile it (could be me). Around that time Eclipse foundation decided to ditch any support for 32bit OSes, so nothing since that version would work until recently...

Hence: viewtopic.php?f=81&t=276291

But version I've put together is working only on 64bit Raspberry Pi OS - which is, I think, still in beta. At least Eclipse there is very fresh and seems to be happy with OS (given Qt library is installed).

But, even though is written with Eclipse (and, quite wrongly, Eclipse settings are committed to github), it is done with maven (there's pom.xml file), so you can easily build it locally just by running

Code: Select all

mvn clean install
from the root of that repo. Beside that, you can open it in IntelliJ (which works on 32bit version of Raspberry Pi OS) or edit Java files in any editor/IDE... But, I would, in this case, just use IDE (Eclipse for instance!) on your laptop/desktop and when you're happy with results, copy (ssh/scp) to RPi and just re-build it there (if needed!) with Maven. Since it is just Java, I think you would be fine build it once and just move .jar files to RPi to execute them there...

BTW I've just built it using maven (on RPi) - for that to work you need to add:

Code: Select all

into <build>/<plugins> part of pom.xml... It seems to be working well - you can start it with:

Code: Select all

java -jar target/PiVPlotter.jar
I haven't done anything with it...

Out of curiosity - have you built a V plotter?

Posts: 18
Joined: Sat Jul 04, 2020 12:10 am

Re: cant get eclipse to start [SOLVED]

Mon Jul 06, 2020 8:49 pm

Thanks Clicky for you detailed answer and the time you took to check it out.

I just compiled it with maven , adding the code at pom.xml, and it worked perfect. I never compiled java, neither program it, so i when i looked at the code in Github i was completely lost. i found some references to eclipse and i discover it to be not really possible to use it in rpi. I tried other IDEs, but i couldn't do nothing having no idea about java .

The plotter it's done, i didn't try it yet with the code from revoutIT because it was not working but tried with code from homofactiens - ... ter_en.htm and it works. Now i am trying to figure how to compile and debug c to understand the program and make some changes. Much to learn!

Revoutit program seems the much more complete V-plotter software i have found. I will do as proposed, check it in another machine with eclipse working and compile it in rpi

Such a satisfactory answer,
thanks Again Clicky

User avatar
Posts: 535
Joined: Thu Oct 25, 2012 7:34 am

Re: cant get eclipse to start

Tue Jul 07, 2020 9:55 am

I'm glad it worked. BTW no need to compile on Pi - just compile it on your laptop/desktop and copy final jar file across...

Posts: 15
Joined: Sat Aug 08, 2020 3:54 pm
Location: Bucharest, Romania

Re: cant get eclipse to start

Tue Sep 08, 2020 1:20 pm

Return to “Java”