# Problem launching eclipse in Ubuntu 16.04

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.

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
||/ 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

• That looks like the arguments to Java, not the error. Is there more to the output than that? – Joseph Sible-Reinstate Monica Mar 2 '17 at 2:58
• @ManojSawai Thanks, but can you help me to get working official repository eclipse? – rancho Mar 2 '17 at 11:40
• @JosephSible Unfortunately no, when i open eclipse from dash only this window I get. – rancho Mar 2 '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 2 '17 at 13:30
• – Elder Geek Mar 2 '17 at 13:45

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?