JDK versions when exporting and running product [message #458642] |
Thu, 23 November 2006 09:21  |
Eclipse User |
|
|
|
Originally posted by: hja-oliveira.criticalsoftware.com
Hello all,
I have an Eclipse RCP plug-in project that I can export as a Linux (gtk/x86) product and run with no problems on the same machine. However, when trying to run the product on another computer, the application fails to start. The error log contains an org.osgi.framework.BundleException, and the message mentions that the plug-in's Activator is invalid.
The problem is similar to the one described in this thread:
http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg15572.html
Basically this happens if the JDK version used to export the product in Eclipse is different from the version used to run it - I'm using Java 1.5.0_09 in to export and 1.5.0_08 to run the product. When I export in the target computer, the application runs without a problem.
Is there any solution/workaround to this? I want to avoid forcing the user to have the exact same version of the JDK to be able to run the product.
Thanks,
hjoliveira
|
|
|
|
Re: JDK versions when exporting and running product [message #458751 is a reply to message #458726] |
Thu, 23 November 2006 14:12  |
Eclipse User |
|
|
|
Actually the cause is below the BundleException. See for example this
log that just happened to me:
>
> !ENTRY org.eclipse.splash 4 0 2006-11-23 14:07:20.772
> !MESSAGE
> !STACK 0
> org.osgi.framework.BundleException: The activator org.eclipse.splash.Activator for bundle org.eclipse.splash is invalid
> at org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:141)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:970)
<snip>
> Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/splash/Activator (Unsupported major.minor version 49.0)
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
The cause in this case is I compiled with java 1.5.0, and tried running
with a 1.4.2 vm.
-Andrew
Andrew Niefer wrote:
> This is very surprising to me, there should not be a difference between
> _08 and _09 that would cause this kind of thing.
>
> A common cause of this thing would be compiling on a 1.5.0 vm and trying
> to run on a 1.4.2 vm. (Class format exceptions).
>
> This invalid activator exception is usually caused by an earlier
> exception that would have occurred when trying to run your activator
> start method. Look in your log just above the BundleException to see
> what the cause is.
>
> If it is a class format issue, see
> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/guide/tasks/pde_compilation_env.htm
>
> for details on how to control your compilation during export.
>
> -Andrew
>
> hjoliveira wrote:
>> Hello all,
>>
>> I have an Eclipse RCP plug-in project that I can export as a Linux
>> (gtk/x86) product and run with no problems on the same machine.
>> However, when trying to run the product on another computer, the
>> application fails to start. The error log contains an
>> org.osgi.framework.BundleException, and the message mentions that the
>> plug-in's Activator is invalid.
>>
>> The problem is similar to the one described in this thread:
>>
>> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg15572.html
>>
>> Basically this happens if the JDK version used to export the product
>> in Eclipse is different from the version used to run it - I'm using
>> Java 1.5.0_09 in to export and 1.5.0_08 to run the product. When I
>> export in the target computer, the application runs without a problem.
>>
>> Is there any solution/workaround to this? I want to avoid forcing the
>> user to have the exact same version of the JDK to be able to run the
>> product.
>>
>> Thanks,
>>
>> hjoliveira
|
|
|
Powered by
FUDForum. Page generated in 0.03717 seconds