3

I am running Ubuntu 16.04 I have installed openJDK via synaptic and also eclipse via synaptic. Everything was working fine. However suddenly I am getting this error when I try to open eclipse.

error code

How to fix this?

The out put of

dpkg -l libtomcat7-java

is

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig- aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-    =================================
ii  libtomcat7-jav 7.0.68-1ubun all          Servlet and JSP engine -- core li

The content of my eclipse.ini is:

 -startup
plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx384m
-    Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
rancho
  • 4,036
  • That looks like the arguments to Java, not the error. Is there more to the output than that? – Joseph Sible-Reinstate Monica Mar 02 '17 at 02:58
  • @ManojSawai Thanks, but can you help me to get working official repository eclipse? – rancho Mar 02 '17 at 11:40
  • @JosephSible Unfortunately no, when i open eclipse from dash only this window I get. – rancho Mar 02 '17 at 11:42
  • Perhaps if you were to [edit] in the content of your log file at ${location of the workspace}/.metadata/.log it would help us help you! Thank you! – Elder Geek Mar 02 '17 at 13:30
  • Related: http://stackoverflow.com/questions/28406104/eclipse-cannot-start-jvm-exit-code-1 – Elder Geek Mar 02 '17 at 13:45
  • I have this problem on my Raspberry Pi 3. It hangs, and that message pops up when I kill it. So glad to see a bounty! – Nonny Moose Mar 02 '17 at 14:01
  • @ElderGeek I added the screenshot, this is the only thing I am getting. Even the option of creating a workspace does not come – rancho Mar 02 '17 at 14:01
  • Does the related link I posted provide any clues? – Elder Geek Mar 02 '17 at 14:26
  • @ElderGeek I have nothing else other than this screenshot – rancho Mar 04 '17 at 01:06
  • Not my strongest suit but if I'm parsing the output correctly it looks like you might be trying to activate plugins from an earlier distribution. (1.1 vs. 3.8) I did find that the file /usr/lib/eclipse/plugins/org.eclipse.platform_3.8.1.dist/splash.bmp comes from the package eclipse-platform-data which is the Eclipse platform without development plug-ins. Would you be so kind as to [edit] the output of dpkg -l libtomcat7-java into your post? – Elder Geek Mar 04 '17 at 20:43
  • @ElderGeek updated my post – rancho Mar 04 '17 at 20:55
  • Well you have the prerequisite installed for that package. Could you also [edit] in the content of $ECLIPSE_HOME/eclipse.ini. or If $ECLIPSE_HOME is not defined, the default eclipse.ini in your Eclipse installation directory? I'm hoping to find some clues comparing that to this Thank you for helping us help you! – Elder Geek Mar 05 '17 at 00:35
  • @ElderGeek updated my question – rancho Mar 05 '17 at 00:53

1 Answers1

5

Upon review of your eclipse.ini file it seems that we haven't specified a specific Java Virtual Machine to run eclipse on. This is appears to be a common stumbling block. Let's remove the uncertainty by explicitly stating which VM to use by placing the -vm argument in your eclipse.ini

It's always a good idea to make a backup if you aren't entirely certain what you are doing, so from the directory containing your eclipse.ini make a copy with cp eclipse.ini ~/Documents/eclipse.bak which will place a backup in your Documents directory.

Locate the version of java you intend to launch this may help and if the results are confusing this post should help provide clarity. Don't skim, read both the accepted and highest rated answers

Specify the full path to the vm your trying to launch.

Example your path is likely different:

-vm
/opt/sun-jdk-1.6.0.02/bin/java

Place the appropriate lines for your installation directly before the -vmargs line as shown in the Specifying the JVM section here

Sources:

https://wiki.eclipse.org/Eclipse.ini

https://superuser.com/questions/357234/how-to-know-the-jvm-path-in-a-linux-system

https://stackoverflow.com/questions/19467761/which-java-in-centos-prints-wrong-java-path

Also of interest:

How to set JAVA_HOME for Java?

Elder Geek
  • 36,023
  • 25
  • 98
  • 183