Ubuntu eclipse must be JDK or later.

Source: Internet
Author: User

Debian & ubutnu
/Jerry Posted on
Ubuntu7.10 (gutsy) is installed, which causes problems when installing eclipse.
Install eclipse. The source version is 3.2.
 
  
  
  1. # Sudo apt-Get install eclipse

Install the Java environment

 
  
  
  1. # Sudo apt-Get install j2sdk1. 4

The following error occurs when you open Eclipse:

JVM terminated. Exit code = 1 (Note: more than 2 GB memory is also prone to this errorCode)
/Usr/lib/j2se/1.4/bin/Java
-Djava. Library. Path =/usr/lib/JNI
-Dgnu. gcj. precompiled. DB. Path =/var/lib/gcj-4.2/classmap. DB
-Dgnu. gcj. runtime. vmclassloader. library_control = never
-Dosgi. Locking = none
-Jar/usr/lib/Eclipse/startup. Jar
-OS Linux
-Ws GTK
-Arch x86
-Launcher/usr/lib/Eclipse/eclipse
-Name eclipse
-Showsplash 600
-Exitdata 178012
-Install/usr/lib/eclipse
-VM/usr/lib/j2se/1.4/bin/Java
-Vmargs
-Djava. Library. Path =/usr/lib/JNI
-Dgnu. gcj. precompiled. DB. Path =/var/lib/gcj-4.2/classmap. DB
-Dgnu. gcj. runtime. vmclassloader. library_control = never
-Dosgi. Locking = none
-Jar/usr/lib/Eclipse/startup. Jar

Search
Let's talk about VM settings on the Internet. Modify eclipse. ini and add-VM.
/Usr/lib/j2se/bin/Java (Java directory). The same error occurs after I modify it. Run eclipse in the command line and you can see that eclipse can
Find the VM. Follow the error message to create a new file.

  
  
  1. # Touch/usr/Local/Lib/Eclipse/. eclipseextension
  2. # Chmod2775/Usr/Local/Lib/Eclipse/. eclipseextension
  3. # Chown root: Staff/usr/Local/Lib/Eclipse/. eclipseextension

A new error occurs.

Exception
In thread "Main" Java. Lang. unsupportedclassversionerror:
Org/Eclipse/CORE/launcher/main (unsupportedmajor. Minor version 49.0)
At java. Lang. classloader. defineclass0 (native method)
At java. Lang. classloader. defineclass (classloader. Java: 539)
At java. Security. secureclassloader. defineclass (secureclassloader. Java: 123)
At java.net. urlclassloader. defineclass (urlclassloader. Java: 251)
At java.net. urlclassloader. Access $100 (urlclassloader. Java: 55)
At java.net. urlclassloader $ 1.run( urlclassloader. Java: 194)
At java. Security. accesscontroller. doprivileged (native method)
At java.net. urlclassloader. findclass (urlclassloader. Java: 187)
At java. Lang. classloader. loadclass (classloader. Java: 289)
At sun. Misc. launcher $ appclassloader. loadclass (launcher. Java: 274)
At java. Lang. classloader. loadclass (classloader. Java: 235)
At java. Lang. classloader. loadclassinternal (classloader. Java: 302)

It turns out to be a Java version problem. Unsupported Major. Minor version 49.0 (is the internal version of the Java compiler, 48 indicates that jdk1.4 is used for compiling and running.Program, 49 indicates that the program is compiled and run with jdk1.5 ).

Delete jdk1.4 and install 1.5

 
  
  
  1. # Sudo apt-Get install sun-java5-jdk

Open eclipse again, no problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.