Hi,
I am trying to run Eclipse 3.4.1 on MacOS 10.5.6? I think I am using java 1.5 when I run eclipse:
$ which java /usr/bin/java $ java -version java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284) Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
And then I click eclipse icon.
In the Preferences->Java->Installed JREs, I did click 'JVM 1.6.0', since I needs to use 1.6 for my project.
But in the .log file, I am getting these errors, why there is class file bad version number? And how can I fix it?
!SESSION 2009-01-29 10:07:29.618 -----------------------------------------------
eclipse.buildId=M20080911-1700
java.version=1.5.0_16
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Framework arguments: -keyring /Users/samuel/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws carbon -arch x86 -keyring /Users/samuel/
.eclipse_keyring -consoleLog -showlocation
!ENTRY com.android.ide.eclipse.adt 4 0 2009-01-29 10:07:42.947
!MESSAGE Failed to start com.android.ide.eclipse.editors
!STACK 0
org.osgi.framework.BundleException: Exception in com.android.ide.eclipse.editors
.EditorsPlugin.start() of bundle com.android.ide.eclipse.editors.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:1028)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:984)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:265)
at com.android.ide.eclipse.adt.AdtPlugin$11.run(Unknown Source)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class
file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.lang.ClassLoader.defineClass(ClassLoader.java:520)
at com.android.ide.eclipse.editors.resources.manager.ProjectClassLoader.
findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMo
nitor.loadAndParseRClass(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMo
nitor.projectOpenedWithWorkspace(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.add
ProjectListener(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMo
nitor.setupMonitor(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.ResourceManager.set
up(Unknown Source)
at com.android.ide.eclipse.editors.EditorsPlugin.start(Unknown Source)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:1003)
... 4 more
Root exception:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.lang.ClassLoader.defineClass(ClassLoader.java:520)
at com.android.ide.eclipse.editors.resources.manager.ProjectClassLoader.
findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMo
nitor.loadAndParseRClass(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMo
nitor.projectOpenedWithWorkspace(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.ResourceMonitor.add
ProjectListener(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.CompiledResourcesMo
nitor.setupMonitor(Unknown Source)
at com.android.ide.eclipse.editors.resources.manager.ResourceManager.set
up(Unknown Source)
at com.android.ide.eclipse.editors.EditorsPlugin.start(Unknown Source)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:1009)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:1003)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:984)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:265)
at com.android.ide.eclipse.adt.AdtPlugin$11.run(Unknown Source)