Skip to main content



      Home
Home » Newcomers » Newcomers » target 1.5 in eclipse
target 1.5 in eclipse [message #258910] Thu, 19 June 2008 19:28 Go to next message
Eclipse UserFriend
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 #258927 is a reply to message #258910] Fri, 20 June 2008 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Mahmood Ali wrote:
> 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?
>

The compiler compliance level is a separate setting than the target
execution env. In the project properties, select the Java Compiler
section and make sure Compiler Compliance Level is set to 1.5

Hope this helps,
Eric
Re: target 1.5 in eclipse [message #258978 is a reply to message #258910] Sat, 21 June 2008 21:26 Go to previous message
Eclipse UserFriend
"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
Previous Topic:plugin and execution environment
Next Topic:XP Developer looking for single IDE for Java/JavaEE/JavaScript/C/C++/Python/php/Perl/Rails... and mo
Goto Forum:
  


Current Time: Fri Jul 18 00:38:24 EDT 2025

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

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

Back to the top