Launch RCP application from Eclipse 3.3/3.4, but failed

RCP Packager allows you to quickly create an RCP installer. Help Composer allows you to easily create and edit Eclipse Help projects and content.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, blacksmith

Launch RCP application from Eclipse 3.3/3.4, but failed

Postby maoyang » Thu Jul 03, 2008 2:02 am

Hi Sir:
I've download RCP developer 3.5.0 and installed it , I also followed your website's how to to created a RCP application from Contact manager template, but when I tried to launch the RCP applicaion from eclipse IDE , I got the exception message as below
Code: Select all
!SESSION 2008-07-03 18:13:36.546 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.5.0_15
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_TW
Framework arguments:  -application com.esast.contactmanager.application
Command-line arguments:  -application com.esast.contactmanager.application -data C:\Documents and Settings\maoyang\獢\testgantt/../runtime-com.esast.contactmanager.product -dev file:C:/Documents and Settings/maoyang/獢/testgantt/.metadata/.plugins/org.eclipse.pde.core/com.esast.contactmanager.product/dev.properties -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.osgi 4 0 2008-07-03 18:13:37.155
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in com.esast.contactmanager was unable to load class com.esast.contactmanager.Application.
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180)
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:164)
   at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
   at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
   at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:165)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
   at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
org.eclipse.core.runtime.CoreException[1]: java.lang.UnsupportedClassVersionError: Bad version number in .class file
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
   at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
   at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
   at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
   at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
   at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
   at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
   at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
   at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
   at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
   at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
   at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
   at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:165)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
   at org.eclipse.equinox.launcher.Main.main(Main.java:1148)

maoyang
 
Posts: 7
Joined: Sat Jun 21, 2008 6:46 pm

Re: Launch RCP application from Eclipse 3.3/3.4, but failed

Postby Eric Clayberg » Thu Jul 03, 2008 3:13 am

A UnsupportedClassVersionError exception is a standard Java exception that indicates that you compiled the class with a newer JDK than the one you are trying to run it with.

Launch the class with the same or newer JDK than the one you compiled with and it should be fine.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Launch RCP application from Eclipse 3.3/3.4, but failed

Postby maoyang » Thu Jul 03, 2008 3:21 am

But my Enviroment only install one JDK which version is 1.5.0, I didn't understand why Eclipse throw this error message , I suspected whether RCP developer's produced plugin library using different JDK compiled class
maoyang
 
Posts: 7
Joined: Sat Jun 21, 2008 6:46 pm

Re: Launch RCP application from Eclipse 3.3/3.4, but failed

Postby maoyang » Thu Jul 03, 2008 3:30 am

I change the Launch JRE version to same as my Eclipse's JDK version , but the problem still exist
maoyang
 
Posts: 7
Joined: Sat Jun 21, 2008 6:46 pm

Re: Launch RCP application from Eclipse 3.3/3.4, but failed

Postby Eric Clayberg » Thu Jul 03, 2008 3:42 am

maoyang wrote:I change the Launch JRE version to same as my Eclipse's JDK version , but the problem still exist

Recompile the class with that same JDK version.

If you are running the class with the same JDK verison you compiled it with, you will not have that exception.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Launch RCP application from Eclipse 3.3/3.4, but failed

Postby maoyang » Thu Jul 03, 2008 4:13 am

I fixed this problem by way of modifying the JRE association in the plugin configuration , thanks for your answer
maoyang
 
Posts: 7
Joined: Sat Jun 21, 2008 6:46 pm

Re: Launch RCP application from Eclipse 3.3/3.4, but failed

Postby Eric Clayberg » Thu Jul 03, 2008 2:47 pm

maoyang wrote:I fixed this problem by way of modifying the JRE association in the plugin configuration , thanks for your answer

That would do it. ;-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to RCP Packager & Help Composer

Who is online

Users browsing this forum: Google [Bot] and 1 guest