Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Building with Java 1.5 and 1.6 in the same workspace
Building with Java 1.5 and 1.6 in the same workspace [message #497353] Thu, 12 November 2009 22:53 Go to next message
Stephen McCants is currently offline Stephen McCantsFriend
Messages: 92
Registered: July 2009
Member
Hello,
I have a large set of Java plugin projects. Some of them need to be built on Java 1.5 (they will
be run under Java 1.5 in an environment I can't completely control), while most would be best built
on Java 1.6. I have both JVM's in Properties->Installed JREs, with 1.6 as the default (also the
default compliance level). Then on the project that needs 1.5, I switched the compliance level to
1.5 and set the build path to use the 1.5 JRE System Library. However, it is still being built to
Java 1.6 and fails with this exception:

java.lang.UnsupportedClassVersionError: (com/ibm/hdwb/util/common/http/atom/QueryResult) bad major
version at offset=6

What additional properties do I need to change to get it to build with Java 1.5?
Thanks in advance!

Sincerely,
Stephen McCants
Re: Building with Java 1.5 and 1.6 in the same workspace [message #497938 is a reply to message #497353] Fri, 13 November 2009 14:56 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Stephen McCants wrote:
> Hello,
> I have a large set of Java plugin projects. Some of them need to be
> built on Java 1.5 (they will be run under Java 1.5 in an environment I
> can't completely control), while most would be best built on Java 1.6.
> I have both JVM's in Properties->Installed JREs, with 1.6 as the default
> (also the default compliance level). Then on the project that needs
> 1.5, I switched the compliance level to 1.5 and set the build path to
> use the 1.5 JRE System Library. However, it is still being built to
> Java 1.6 and fails with this exception:
>
> java.lang.UnsupportedClassVersionError:
> (com/ibm/hdwb/util/common/http/atom/QueryResult) bad major version at
> offset=6
>
> What additional properties do I need to change to get it to build
> with Java 1.5?
> Thanks in advance!

I'm assuming you're using plug-in projects with PDE. To ensure things
work properly, you need to setup your execution environments and BREEs
properly. Check these resources out:

http://michaelscharf.blogspot.com/2006/07/how-to-setup-some- plugins-to-use-java.html
http://eclipsesource.com/blogs/2009/04/02/osgi-execution-env ironment-validation/

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Building with Java 1.5 and 1.6 in the same workspace [message #603279 is a reply to message #497353] Fri, 13 November 2009 14:56 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Stephen McCants wrote:
> Hello,
> I have a large set of Java plugin projects. Some of them need to be
> built on Java 1.5 (they will be run under Java 1.5 in an environment I
> can't completely control), while most would be best built on Java 1.6.
> I have both JVM's in Properties->Installed JREs, with 1.6 as the default
> (also the default compliance level). Then on the project that needs
> 1.5, I switched the compliance level to 1.5 and set the build path to
> use the 1.5 JRE System Library. However, it is still being built to
> Java 1.6 and fails with this exception:
>
> java.lang.UnsupportedClassVersionError:
> (com/ibm/hdwb/util/common/http/atom/QueryResult) bad major version at
> offset=6
>
> What additional properties do I need to change to get it to build
> with Java 1.5?
> Thanks in advance!

I'm assuming you're using plug-in projects with PDE. To ensure things
work properly, you need to setup your execution environments and BREEs
properly. Check these resources out:

http://michaelscharf.blogspot.com/2006/07/how-to-setup-some- plugins-to-use-java.html
http://eclipsesource.com/blogs/2009/04/02/osgi-execution-env ironment-validation/

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Previous Topic:Project exporter
Next Topic:pde.visualization.dependency
Goto Forum:
  


Current Time: Tue Aug 04 20:22:21 GMT 2020

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

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

Back to the top