简体   繁体   中英

Find Java VM for Eclipse on Linux

I just moved to Linux and started using Ubuntu but it's giving a hard time trying to run Eclipse IDE. I downloaded the 64-bit versions of both JDK and Eclipse and extracted the files into my 'Documents' folder. I know I need to manually select the path of the java vm to execute eclipse, but I can't make it work:

I tried this first:

./eclipse -vm /home/lucasamura/Documents/jdk1.7.0_51/bin/java

and I got this error:

JVM terminated. Exit code=2 /home/lucasamura/Documents/jdk1.7.0_51/bin/java
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /home/lucasamura/Documents/eclipse//plugins/org.eclipse.platform_4.3.1.v20130911-1000/splash.bmp
-launcher /home/lucasamura/Documents/eclipse/eclipse
-name Eclipse
--launcher.library /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20130807-1835/eclipse_1506.so
-startup /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.appendVmargs
-exitdata 34800b
-product org.eclipse.epp.package.java.product
-vm /home/lucasamura/Documents/jdk1.7.0_51/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

The terminal also displayed two more errors:

Error: could not find libjava.so 
Error: Could not find Java SE Runtime Enviroment   

So I decided to try using the path for the jre inside the jdk folder:

./eclipse -vm /home/lucasamura/Documents/jdk1.7.0_51/jre/bin/java

But then I was 'rewarded' with the following:

JVM terminated. Exit code=127 /home/lucasamura/Documents/jdk1.7.0_51/jre/bin/java
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /home/lucasamura/Documents/eclipse//plugins/org.eclipse.platform_4.3.1.v20130911-1000/splash.bmp
-launcher /home/lucasamura/Documents/eclipse/eclipse
-name Eclipse
--launcher.library /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20130807-1835/eclipse_1506.so
-startup /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.appendVmargs
-exitdata 35800b
-product org.eclipse.epp.package.java.product
-vm /home/lucasamura/Documents/jdk1.7.0_51/jre/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/lucasamura/Documents/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

And this on the terminal:

libraries: libjli.so: cannot open shared object file: No such file or directory

Any ideas on what I may be doing wrong?

I suggest that you use apt to install java, and save yourself some trouble.

OpenJDK is available by default.

A PPA for the Oracle JDK is available here: https://launchpad.net/~webupd8team/+archive/java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM