Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dsdp-ercp-dev] java.lang.UnsupportedClassVersionError

Hi Johnson,

    Thanks I actually solve the problem. The change I made was set
the compliance 1.4 compliance level on java compiler option available
for all projects.
When it not works was when I used 1.4 compliance level ONLY FOR THE
PROJECT THAT I WANT TO EXPORT AS A PLUGIN, that is for project
specific option. Change it as a global seting
(Windows>Preferences>Java>Compiler)
solves the problem. It looks like a eclipse bug, I guess.

Thanks again.

On Mon, Mar 31, 2008 at 4:06 PM, Johnson Ma <johnson.ma01@xxxxxxxxx> wrote:
> Hi Edgar
>
> Maybe you can open that class in binary editor (such as xxd) to check the
> version number.
> The first 4 bytes are magic number, it should always be 0xCAFEBABE.
> The next 2 bytes are minor_version, and the following 2 bytes are
> major_version.
>
>
> Check the major_version to see if it is compatible with the JRE you are
> trying to use.
> *jdk1.4 major 48
> *jdk1.5 major 49
> *jdk1.6 major 50
>
> Regards
>
> Johnson
>
>
>
> On Sun, Mar 30, 2008 at 6:34 PM, Edgar Camacho <edgar@xxxxxxxxxxxxxxxxx>
> wrote:
>
> >
> >
> >
> > Hello,
> >
> >  I get the following error when I try to launch my eRCP plugin on
> eWorkbench.
> > I am compiling using 1.4 compliance level on java compiler, and
> > Generated .class file compatibility.
> >
> > Root exception:
> > java.lang.UnsupportedClassVersionError:
> > (com/treeknowledge/tk/movil/AppPlugin) bad major version at offset=6
> >        at java.lang.ClassLoader.defineClassImpl(Native Method)
> >        at java.lang.ClassLoader.defineClass(Unknown Source)
> >        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(Unknown
> > Source)
> >        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(Unknown
> > Source)
> >        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Unknown
> > Source)
> >        at java.lang.ClassLoader.loadClass(Unknown Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Unknown
> > Source)
> >        at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.preFindLocalClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Unknown
> > Source)
> >        at java.lang.ClassLoader.loadClass(Unknown Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(Unknown
> > Source)
> >        at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(Unknown
> > Source)
> >        at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(Unknown
> > Source)
> >        at
> org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(Unknown
> > Source)
> >        at
> org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(Unknown
> > Source)
> >        at
> org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(Unknown
> > Source)
> >        at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Unknown
> Source)
> >        at
> org.eclipse.ui.internal.registry.ViewDescriptor.createView(Unknown Source)
> >        at
> org.eclipse.ui.internal.ViewFactory.busyRestoreViewHelper(Unknown Source)
> >        at org.eclipse.ui.internal.ViewFactory.busyRestoreView(Unknown
> Source)
> >        at org.eclipse.ui.internal.ViewFactory.restoreView(Unknown Source)
> >        at org.eclipse.ui.internal.Perspective.showView(Unknown Source)
> >        at org.eclipse.ui.internal.WorkbenchPage.busyShowView(Unknown
> Source)
> >        at org.eclipse.ui.internal.WorkbenchPage.showView(Unknown Source)
> >        at org.eclipse.ui.internal.WorkbenchPage.showView(Unknown Source)
> >        at org.eclipse.ercp.eworkbench.DefaultView.launchSelection(Unknown
> Source)
> >        at org.eclipse.ercp.eworkbench.DefaultView.open(Unknown Source)
> >        at org.eclipse.jface.viewers.StructuredViewer$2.run(Unknown Source)
> >        at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
> >        at org.eclipse.core.runtime.Platform.run(Unknown Source)
> >        at org.eclipse.ui.internal.JFaceUtil$1.run(Unknown Source)
> >        at org.eclipse.jface.util.SafeRunnable.run(Unknown Source)
> >        at org.eclipse.jface.viewers.StructuredViewer.fireOpen(Unknown
> Source)
> >        at org.eclipse.jface.viewers.StructuredViewer.handleOpen(Unknown
> Source)
> >        at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Unknown
> Source)
> >        at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(Unknown
> Source)
> >        at org.eclipse.jface.util.OpenStrategy.access$2(Unknown Source)
> >        at org.eclipse.jface.util.OpenStrategy$1.handleEvent(Unknown
> Source)
> >        at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
> >        at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
> >        at org.eclipse.swt.widgets.Widget.internal_sendEvent(Unknown
> Source)
> >        at
> org.eclipse.swt.internal.symbian.OS.Display_ReadAndDispatch(Native Method)
> >        at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
> >        at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
> >        at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
> >        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown
> Source)
> >        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
> >        at org.eclipse.ercp.eworkbench.eWorkbench.run(Unknown Source)
> >        at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown Source)
> >        at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown
> > Source)
> >        at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown
> > Source)
> >        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown
> Source)
> >        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown
> Source)
> >        at java.lang.reflect.AccessibleObject.invokeL(Unknown Source)
> >        at java.lang.reflect.Method.invoke(Unknown Source)
> >        at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
> >        at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
> >        at org.eclipse.core.launcher.Main.run(Unknown Source)
> >        at org.eclipse.core.launcher.Main.main(Unknown Source)
> > _______________________________________________
> > dsdp-ercp-dev mailing list
> > dsdp-ercp-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/dsdp-ercp-dev
> >
>
>
>
>
> _______________________________________________
>  dsdp-ercp-dev mailing list
>  dsdp-ercp-dev@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/dsdp-ercp-dev
>
>


Back to the top