Plug-in: Bad version number in .class file [message #335364] |
Fri, 03 April 2009 17:06  |
Eclipse User |
|
|
|
Originally posted by: karl.weber99.gmx.net
Hi,
I am pretty frustrated by now, since I have no idea about what could be
wrong here:
Eclipse 3.4.2
Default JRE 1.6.0
Target Platform in PDE settings: JRE 1.6.0
I build a tiny plug-in with one action for the toolbar and one corresponding
class. All runs nice in the runtime workbench.
However, when I create a feature with this plug-in and install it, I get the
following error:
Plug-in Hello was unable to load class
aaa.eclipse.contribution.hello.HelloAction.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
.......
eclipse.buildId=M20090211-1700
java.version=1.5.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86 -clean
Why? Where does this java.version 1.5.0_16 come from? My settings are all
1.6.0???
Furthermore, the plug-in seems to work, i.e. the button in the toolbar shows
and when I click it, the correct Action is executed. I get this error
message only, when the plug-in is first loaded.
I make this fuss, because I have I larger plug-in, that has the same problem
and that does not work....
Thanks in advance,
-Karl
|
|
|
Re: Plug-in: Bad version number in .class file [message #335365 is a reply to message #335364] |
Fri, 03 April 2009 17:18   |
Eclipse User |
|
|
|
Originally posted by: karl.weber99.gmx.net
> Hi,
>
> I am pretty frustrated by now, since I have no idea about what could be
> wrong here:
>
> Eclipse 3.4.2
> Default JRE 1.6.0
> Target Platform in PDE settings: JRE 1.6.0
>
> I build a tiny plug-in with one action for the toolbar and one
> corresponding class. All runs nice in the runtime workbench.
>
> However, when I create a feature with this plug-in and install it, I get
> the following error:
>
> Plug-in Hello was unable to load class
> aaa.eclipse.contribution.hello.HelloAction.
>
> java.lang.UnsupportedClassVersionError: Bad version number in .class file
> at java.lang.ClassLoader.defineClass1(Native Method)
> ......
>
> eclipse.buildId=M20090211-1700
> java.version=1.5.0_16
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_DE
> Command-line arguments: -os linux -ws gtk -arch x86 -clean
>
>
> Why? Where does this java.version 1.5.0_16 come from? My settings are all
> 1.6.0???
>
> Furthermore, the plug-in seems to work, i.e. the button in the toolbar
> shows and when I click it, the correct Action is executed. I get this
I have to correct myself: the plug-in is _not_ working....
> error message only, when the plug-in is first loaded.
>
> I make this fuss, because I have I larger plug-in, that has the same
> problem and that does not work....
>
> Thanks in advance,
>
> -Karl
|
|
|
|
|
|
Re: Plug-in: Bad version number in .class file [message #335373 is a reply to message #335370] |
Sat, 04 April 2009 03:53  |
Eclipse User |
|
|
|
Originally posted by: karl.weber99.gmx.net
Hi Olivier,
Olivier Thomann wrote:
>> eclipse.buildId=M20090211-1700
>> java.version=1.5.0_16
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_DE
>> Command-line arguments: -os linux -ws gtk -arch x86 -clean
> Do you have a -vm option in the eclipse.ini file ?
>
> Make sure that your bundle target 1.6. You can do this by setting the EE
> of your bundle to J2SE-1.5.
> --
> Olivier
Well, the target bundle was 1.6 and there was _no_ -vm argument in
eclipse.ini -- and that was the problem. I have SDK 1.5 and 1.6 on my
system and eclipse, not instructed with -vm, found the wrong one, i.e. the
1.5 SDK. I added a -vm for the 1.6 on the commandline and it worked!
Great many thanks.
-Karl.
|
|
|
Powered by
FUDForum. Page generated in 0.06075 seconds