Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Plug-in in JDK 1.5
Plug-in in JDK 1.5 [message #289281] Wed, 03 August 2005 09:54 Go to next message
Dubois Jean-Jacques is currently offline Dubois Jean-JacquesFriend
Messages: 8
Registered: July 2009
Junior Member
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?

Thx for your help

Dubois JJ
Re: Plug-in in JDK 1.5 [message #289312 is a reply to message #289281] Wed, 03 August 2005 15:07 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #289444 is a reply to message #289312] Thu, 04 August 2005 23:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Eric Rizzo" <eclipse3@rizzoweb.com> wrote in message
news:dcqmmu$q6k$1@news.eclipse.org...
> [...]
> 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.


AFAIK, not readily possible. See (and vote for!)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=98798. The basic problem is
that if the plugin requires 1.5 it won't load under 1.4 and thus won't be
able to display a useful message. The fix needs to be in the plugin loader,
not the plugin.

-walter
Re: Plug-in in JDK 1.5 [message #289450 is a reply to message #289407] Fri, 05 August 2005 07:41 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:classpath again
Next Topic:Getting .class files for .java file
Goto Forum:
  


Current Time: Wed Apr 24 16:16:20 GMT 2024

Powered by FUDForum. Page generated in 0.03674 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top