|
Re: Plug-in in JDK 1.5 [message #289312 is a reply to message #289281] |
Wed, 03 August 2005 15:07 |
Eclipse User |
|
|
|
Originally posted by: eclipse3.rizzoweb.com
Dubois JJ wrote:
> Hi,
>
> I've a question for the future release of Eclipse...
> Can we use pure Java 5.0 for the plug-in compilation and runtime?
You should be aware that if you do so, anyone who wants to use that
plugin will also be required to run their Eclipse under a 1.5 JVM. While
you may be completely migrated to 1.5, not all developers are going to
be there yet, so you will likely limit the audience of your plugin.
Also, please do the community a favor and fail gracefully with a useful
message to the user if your plugin requires 1.5 but someone tries to run
it on an older JVM.
HTH,
Eric
|
|
|
Re: Plug-in in JDK 1.5 [message #289378 is a reply to message #289312] |
Thu, 04 August 2005 07:54 |
Eclipse User |
|
|
|
Originally posted by: eclipse.bettsockentraeger.de
Eric Rizzo wrote:
> Dubois JJ wrote:
>
>> Hi,
>>
>> I've a question for the future release of Eclipse...
>> Can we use pure Java 5.0 for the plug-in compilation and runtime?
>
>
> You should be aware that if you do so, anyone who wants to use that
> plugin will also be required to run their Eclipse under a 1.5 JVM. While
> you may be completely migrated to 1.5, not all developers are going to
> be there yet, so you will likely limit the audience of your plugin.
> Also, please do the community a favor and fail gracefully with a useful
> message to the user if your plugin requires 1.5 but someone tries to run
> it on an older JVM.
>
> HTH,
> Eric
Is this also true if you compile the plugin using a 1.4 class file
compliance setting or is this not possible?
Regards
Stefan
|
|
|
Re: Plug-in in JDK 1.5 [message #289407 is a reply to message #289378] |
Thu, 04 August 2005 13:27 |
Eclipse User |
|
|
|
Originally posted by: olivier_thomann.NOca.ibm.comSPAM
Stefan Langer a écrit :
> Is this also true if you compile the plugin using a 1.4 class file
> compliance setting or is this not possible?
This should work, but then why would you use a 1.5 JDK? If you use 1.5
specific methods, you will end up with NoSuchMethodError even if you use
1.4 compliance.
Using a 1.4 should be good enough.
--
Olivier
|
|
|
|
Re: Plug-in in JDK 1.5 [message #289450 is a reply to message #289407] |
Fri, 05 August 2005 07:41 |
Eclipse User |
|
|
|
Originally posted by: eclipse.bettsockentraeger.de
Olivier Thomann wrote:
> Stefan Langer a écrit :
>
>> Is this also true if you compile the plugin using a 1.4 class file
>> compliance setting or is this not possible?
>
> This should work, but then why would you use a 1.5 JDK? If you use 1.5
> specific methods, you will end up with NoSuchMethodError even if you use
> 1.4 compliance.
> Using a 1.4 should be good enough.
> --
> Olivier
WEll this would enable you to use certain 1.5 Features like Generics and
the like and compile it with a 1.5 compiler to 1.4 compliance level. So
when eclipse switches to 1.5 you wouldn't have to rewriter your plugin
since it is allready using 1.5 syntax.
Regards
Stefan
|
|
|
Re: Plug-in in JDK 1.5 [message #289470 is a reply to message #289450] |
Fri, 05 August 2005 12:22 |
Eclipse User |
|
|
|
Originally posted by: olivier_thomann.NOca.ibm.comSPAM
Stefan Langer a écrit :
> WEll this would enable you to use certain 1.5 Features like Generics and
> the like and compile it with a 1.5 compiler to 1.4 compliance level. So
> when eclipse switches to 1.5 you wouldn't have to rewriter your plugin
> since it is allready using 1.5 syntax.
This is not true. You cannot use generics or any 1.5 constructs and
generate the code with a target that is not 1.5 (or 5). So that
generated code could not run on a 1.4 VM.
1.4 compliance level means it behaves like javac 1.4. javac 1.4 doesn't
know what generics means so it would fail with syntax errors.
--
Olivier
|
|
|
Re: Plug-in in JDK 1.5 [message #289471 is a reply to message #289470] |
Fri, 05 August 2005 12:40 |
Eclipse User |
|
|
|
Originally posted by: eclipse.bettsockentraeger.de
Olivier Thomann wrote:
> Stefan Langer a écrit :
>
>> WEll this would enable you to use certain 1.5 Features like Generics
>> and the like and compile it with a 1.5 compiler to 1.4 compliance
>> level. So when eclipse switches to 1.5 you wouldn't have to rewriter
>> your plugin since it is allready using 1.5 syntax.
>
> This is not true. You cannot use generics or any 1.5 constructs and
> generate the code with a target that is not 1.5 (or 5). So that
> generated code could not run on a 1.4 VM.
> 1.4 compliance level means it behaves like javac 1.4. javac 1.4 doesn't
> know what generics means so it would fail with syntax errors.
> --
> Olivier
Thanks for clearifiing this.
I'm not talking about compiler setting but class file compliance. But it
seems that this also applies to class file compliance.
Thanks
Stefan
|
|
|
Re: Plug-in in JDK 1.5 [message #289475 is a reply to message #289471] |
Fri, 05 August 2005 13:05 |
Eclipse User |
|
|
|
Originally posted by: olivier_thomann.NOca.ibm.comSPAM
Stefan Langer a écrit :
> Thanks for clearifiing this.
> I'm not talking about compiler setting but class file compliance. But it
> seems that this also applies to class file compliance.
1.5 constructs require the target to be 1.5 (major version: 49, minor
version: 0). Such .class file would not run on a 1.4 VM. 1.4 VM cannot
handle .class file where the major version is greater than 48.
You would get an error like this:
Exception in thread "main" java.lang.UnsupportedClassVersionError: X
(Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
...
--
Olivier
|
|
|
Powered by
FUDForum. Page generated in 0.03674 seconds