target 1.5 in eclipse [message #258910] |
Thu, 19 June 2008 19:28  |
Eclipse User |
|
|
|
Originally posted by: mahmood.mit.edu
I'm trying to write a plugin targetted for java 5. My eclipse is running
on java 5 (on Mac). Yet, when I finish writing the plug-in (and sometimes
after changing some settings), I get:
Incompatible .class files version in required binaries. Project 'Test' is
targeting a 1.5 runtime, but is compiled against
'Applications/eclipse/plugins/org.eclipse.jdt.compiler.apt_1 .0.100.v20080414-2145.jar'
which requires a 1.6
If eclipse is running in J2SE execution environment, shouldn't its jars be
compiled with 1.5?
|
|
|
|
Re: target 1.5 in eclipse [message #258978 is a reply to message #258910] |
Sat, 21 June 2008 21:26  |
Eclipse User |
|
|
|
"Mahmood Ali" <mahmood@mit.edu> wrote in message
news:253ee67a91c28c21faab24755e2e4c80$1@www.eclipse.org...
> I'm trying to write a plugin targetted for java 5. My eclipse is running
> on java 5 (on Mac). Yet, when I finish writing the plug-in (and sometimes
> after changing some settings), I get:
>
> Incompatible .class files version in required binaries. Project 'Test' is
> targeting a 1.5 runtime, but is compiled against
> 'Applications/eclipse/plugins/org.eclipse.jdt.compiler.apt_1 .0.100.v20080414-2145.jar'
> which requires a 1.6
> If eclipse is running in J2SE execution environment, shouldn't its jars be
> compiled with 1.5?
What Eric said is right.
But to fill in some details: jdt.compiler.apt implements Java 6 APIs
(specifically, JSR269 annotation processing), so it cannot load unless it's
running on Java 6.
In general, Eclipse plugins have a wide variety of requirements. There are
some parts of Eclipse that only require 1.4 (and maybe some that only need
1.3!), some that require 1.5, and some that require 1.6. What features you
get depend upon what JRE you're running on at the time.
And in any case, I'm not sure why you'd need jdt.compiler.apt on your
compile-time classpath; there are no public APIs exposed by that plugin. I
think you may be taking a wrong approach here, so if you can say more about
what you're trying to do, I may be able to help.
I'm adding eclipse.tools.jdt to the "newsgroups" list, because it's a bit
more appropriate for a discussion at this level.
Thanks,
-Walter Harley
JDT APT lead
|
|
|
Powered by
FUDForum. Page generated in 0.08088 seconds