How to launch eclipse on Ubuntu 12.04 - java

JVM terminated. Exit code=2
/usr/local/bin/java
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
--launcher.library /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist/eclipse_1408.so
-startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
--launcher.overrideVmargs
-exitdata 428003
-clean
-initialize
-vm /usr/local/bin/java
-vmargs
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
So java -version give path not found. I have tried the following:
Edit ~/.bashrc ~/.profile /etc/environment bash.bashrc files and add to them the following
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_15
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
JRE_HOME=/usr/lib/jvm/jre1.7.0_15
PATH=$PATH:$HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
In addition, I also manually added the java bin directory to PATH. I have restarted my computer several times but I still get
bash: /usr/local/bin/java: No such file or directory

Put $JAVA_HOME/bin at the front of your path. Don't put $JRE_HOME/bin in your path at all.
Currently you're picking up some other file (probably a symlink) in /usr/local/bin, because that directory appears first in your path.
I'm not sure why you installed Java in /usr/lib; is that where the Ubuntu installer puts it? If yes, then I would expect /usr/local/bin/java to point to a valid file. You might want to double-check that.
And finally (the reason I asked for the output of java -version), make sure that you're running an x64 version of the JVM, because that's the version of Eclipse that you're using.

So where do you have Java installed, to /usr/local/bin/java or to /usr/lib/jvm/jdk1.7.0_15/bin/java?
Do a ls -l /usr/local/bin/java /usr/lib/jvm/jdk1.7.0_15/bin/java, what is the result?

Maybe, you need to update the references to your compiler path, since your ubuntu is not recognizing the path where you installed jdk or jre:
Use this command to see what are the java versions in your computer:
sudo update-alternatives --config java
Then if necessary, update the location of the jdk and jre you're using:
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-6.31-oracle/bin/javac" 1
And then, please, execute this:
sudo update-alternatives --config javac
I had a similar problem and solved by using this commands.
Hope it will help you.

so the problem was admin rights issue on my corporate network, because my account has limited access even with sudo. I'm reinstalling my computer with full admin rights

Related

Unable to launch eclipse after updating java version to java 8.........Resolved

I updated my java version to java 8 as one of the website demands it to run its content. But after updating the java version to Java 8 it gave me trouble in launching the eclipse. I got the following prompt when i try to launch eclipse:
Java was started but returned exit code=13
C\:ProgramData\Oracle\Java\javapath\javaw.exe
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
-XX:MaxPermSize=256
-jar
D:\CMSI\eclipse-juno\eclipse-juno2\\plugins/org.eclipse.equinox.launcher_1.3.0
.v20120522-1813.jar
-os win32
-ws win32
-arch x86_64
-showsplash
D:\CMSI\eclipse-juno\eclipse-juno2\\plugins\org.eclipse.equinox.launcher.win3
2.win32.x86_64_1.1.200.v20120913-144807\eclipse_1503.dll
-startup
D:\CMSI\eclipse-juno\eclipse-juno2\\plugins/org.eclipse.equinox.launcher_1.3.0
.v20120522-1813.jar
--launcher.overrideVmargs
-exitdata 18b0_5c
-product org.eclipse.epp.package.jee.product
-vm C:\PragramData\Oracle\Java\javapath\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
-XX:MaxPermSize=256
-jar
D:\CMSI\eclipse-juno\eclipse-juno2\\plugins/org.eclipse.equinox.launcher_1.3.0
.v20120522-1813.jar
After complete installation the system asked me to remove the older version of java, i did not remove that thinking that my application is running in older version may be it could cause any problem with that.
I got the solution of the above problem so thought of sharing it, as this problem came across with many of my colleagues.
When the java version is updated to java8, it made an entry:
C:\ProgramData\Oracle\Java\javapath
in the PATH variable(on windows system) in the System variable. So removing this entry from PATH variable would resolve the problem.
So proceed as follows:
Right click on the My Computer icon --> Properties -->Advanced system settings --> Environment Variables
Now under System variable scroll to the Path variable
Select Path variable and click on edit button
Remove the entry "C:\ProgramData\Oracle\Java\javapath" from it and exit
It would resolve the prblem..........Cheers!!!

Can't start Eclipse Luna SR2 on Windows 8.1 (64-bit)

I want to learn how to program apps for Android, and have both a new build of Java installed as well as Eclipse Luna SR2 downloaded and extracted. However, it seems I am running into a problem in starting up; I'm not sure how to solve the issue, unless it could be that I need to change the Runtime Environment variables.
Here's the message the dialog box displays when I try to run the program through Command Prompt:
Java was started but returned exit code= 13
C:\ProgramData\Oracle\Java\javapath\java.exe
-Dosgi.requiredJavaVersion= 1.6
-Xms40m
-Xmx512m
-jar C:\Users\Gregory\Documents\Eclipse
Luna\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
-os win32
-ws win32
-arch x86_64
-showsplash C:\Uses\Gregory\Documents\Eclipse
Luna\eclipse\\plugins\org.eclipse.platform_4.4.2.v20150204-1700\splash.bmp
-launcher C:\Users\Gregory\Documents\Eclipse Luna\eclipse\eclipsec.exe
-name Eclipsec
--launcher.library C:\Users\Gregory\Documents\Eclipse
Luna\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v
20150204-1316\eclipse_1608.dll
-startup C:\Users\Gregory\Documents\Eclipse
Luna\eclipse\\plugins/org.clipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.appendVmargs
-exitdata 100c_84
-product org.eclipse.epp.package.java.product
-vm C:\ProgramData\Oracle\Java\javapath\java.exe
-vmargs
-Dosgi.requiredJavaVersion= 1.6
-Xms40m
-Xmx512m
-jar C:\Users\Gregory\Documents\Eclipse
Luna\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
Could you please help me out here?
try this: go to System > Advanced system setting > Environment Variables
Under System variables :
C:\ProgramData\Oracle\Java\javapath;
remove this
hope this helps
My best guess based on what I see here is that the JRE "bitness" doesn't match Eclipse.
What do you get when you type "java -version" on the command prompt?
If it's telling you that you've installed a 32-bit version of Java, you'll need to change that to a 64-bit version.
Also... "-startup C:\Users\Gregory\Documents\Eclipse
Luna\eclipse\plugins/org.clipse.equinox.launcher_1.3.0.v20140415-2008.jar" looks suspicious. There's a missing "e" in "...org.clipse.equinox...". Did you modify the eclipse.ini file?

Eclipse does not launch (Ubuntu) : JVM terminated. Exit code=2

I install ubuntu 14.04 LTS (64bit)
After that Install Eclipse Luno Standard for 64bit
Install Jdk and follow all the step for setting jdk using following link,
http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux
Then After I enable to start my eclipse it giving me a following Error,
VM terminated. Exit code=2
/usr/bin/java
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-jar /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415- 2008.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925- 0400/splash.bmp
-launcher /home/eheuristic/Ecclipse/eclipse/eclipse
-name Eclipse
--launcher.library /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1. 200.v20140603-1326/eclipse_1605.so
-startup /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.appendVmargs
-exitdata 208017
-product org.eclipse.epp.package.java.product
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-jar /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
I so much try to solve setting Environment variable but can't do, help me one suggest to how to solve it.
First, I strongly recommend you use the webupd8 ppa
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Then to set it
sudo update-java-alternatives -s java-8-oracle
The advantage is ease of updates.
write in eclipse.in on the top of the file
-startu
-vm
/usr/local/jdk/jre/bin
change path according to your system
Had the same error. Solved it by:
sudo update-alternatives --config java
I started "using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode" - that was option 4, and it worked fine.
I am using Luna Service Release 2 (4.4.2).
Hope it helps someone somewhere.
I know exactly how to solve your problem, go to search and put in environment, a prompt will come up and ask you to"edit environmental variables for your account" click that and a window will pop up. there will be the current paths which are running on the top (you should have your jdk version running mine is 1.8) and on the bottom part there will be paths too choose from. select (on the bottom part) the java path and delete it, then click okay. it should work
I find my Stupid Solution ,
I trying install jdk that is support for 32 bit.
I downloads new jdk1.8.0_25 for 64 bit and follow the step, i got solutions.
I had this same problem when trying to run Eclipse and Android Studio on Ubuntu with Java 9 .
Solution: Install Java 8 sudo apt-get install oracle-java8-installer
and set it as default
sudo apt-get install oracle-java8-set-default
and voilĂ .

Eclipse does not launch (Ubuntu) : JVM terminated. Exit code=13

I have a problem with Eclipse. When I try to launch it, I get this error message:
JVM terminated. Exit code=13
/usr/bin/java
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-XX:MaxPermSize=256m
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
--launcher.library /usr/lib/eclipse//plugins /org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist/eclipse_1407.so
-startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
--launcher.overrideVmargs
-exitdata a8004
-vm /usr/bin/java
-vmargs
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-XX:MaxPermSize=256m
-jar /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
I have found the same error code but not the same text below, and the proposed solutions didn't work.
Can you help me?
Usually has to do with incompatible architectures of Eclipse and the JVM. I am betting you got eclipse 32 bit trying to run on 64 bit jvm.
As mentioned above, you are most certainly using incompatible JVM.
Run the following command to check and set proper JVM:
sudo update-alternatives --config java
It is okay that the error message is different, because you are starting eclipse with different parameters and the error message is simply listing the parameters. Thus, the answers provided by google will work, and I think that the information provided in the following pages will be enough.
http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
Cannot run Eclipse; JVM terminated. Exit code=13
I had similar problem. It solved after, I have download JRE from http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
and put it in the path of eclipse as shown below -
abc#ubuntu:~/Downloads/eclipse$ ls
about_files
configuration
eclipse.ini
icon.xpm
p2 about.html
dropins
epl-v10.html
jre
plugins artifacts.xml
eclipse
features
notice.html
readme
I hope it helps.

Setting up eclipse on ubuntu

I have a small problem with Eclipse on my Ubuntu machine. I installed JDK, set JAVA_HOME and PATH variables, all seems correct, but eclipse refuses to launch and throws an error:
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be
available in order to run Eclipse. No Java virtual machine was found
after searching the following locations: /opt/eclipse/jre/bin/java
java in your current PATH
have no clue what's the problem. help please.
note:
I am able to run java and javac in terminal.
If you get this error even though you already have JDK in your system-just follow this steps:
1)open eclipse.ini file with text editor.
2)copy your jdk path by using -vm command (vm and your path should not be in same line)
eg:
-vm
/usr/lib/java/jdk1.7.0_75/jre/bin/java
3)-vm should be placed before -vmargs in eclipse.ini file.
99% works if you follow above simple steps
This worked for me:
ubuntu:~$ sudo apt-get install default-jre
You need to create a link at /usr/bin/java for the java binary (wherever you have placed it).
sudo ln -s /path/to/jre*/bin/java /usr/bin/java
You probably need to set your JAVA_HOME env var something like:
export JAVA_HOME=/apps/java/jdk1.6.0_13
Check this answer out
open your eclipse.ini file
add
-vm
usr/lib/jvm/jdk1.8.x_xx/jre/bin/java
this must be placed before -vmarg
save the file
start your eclipse
Happy Coding...
it seems eclipse looks for java under /usr/bin directory, making a symbolic link of the java command in this dir would solve your problems, at least solve mine
I have to run a number of jre and jdks on my machine and did not want to mess with the environment. I wanted to keep 1.6 for my environment but run eclipse under 1.7. I added the following line to my elcipse.ini file to specify the exact jvm to run eclipse:
-vm
/usr/lib/jvm/jdk1.7_latest/bin/java
Obviously your path might be different. Note that above jdk1.7_latest is a symlink to the specific version of the latest Java 7 jdk.
Hope that helps somebody.
This is the problem of your jdk is not setup properly for current profile.
Before starting eclipse in your current profile. Run "java -version" command on your current profile where you are running eclipse. Surely it will ask to install jdk/jre even jdk already installed but on different profile.
Hence there is two way:
Solution 1. install jdk on current profile edit and add following lines
vi /etc/profile
export JAVA_HOME=/usr/local/jdk-1.8
export PATH=$PATH:$JAVA_HOME/bin
Solution 2: ~/.profiles
export JAVA_HOME=/usr/local/jdk-1.8
export PATH=$PATH:$JAVA_HOME/bin
Solution 3: I tried and working perfectly for me.
1. gedit /home/../eclipse/eclipse.ini
2. Add following line before -vmargs and any plugin or jar execution in eclipse.ini file
-startup
-vm
/usr/local/java/jdk1.8.0_251/bin/java.exe
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
This solution is perfectly working after explore from many stackoverflow suggestions and blogs.

Categories

Resources