MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
hahagal
Post subject: Java Compliance Level  PostPosted: May 30, 2012 - 10:51 AM



Joined: Apr 22, 2011
Posts: 97

Hi,

I tried to create a JavaEE 5.0 enterprise project and I get this prompt "Compiler compliance level of project should be 5.0. Your current workspace default is 6.0. Do you want to use a custom setting for your project?" My workspace default is set to 1.6. How should I proceed?

Using MEB 10 and WebSphere 7.0
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: May 30, 2012 - 11:22 AM



Joined: Nov 11, 2010
Posts: 2491

hahagal,

You can either click "Yes" or "No" depending on the compliance level you want. If you choose "Yes" the compliance level will be 5.0 else it will default to 6.0. You can change the compliance level of your project from its properties.
Right click on your project and go to properties > Java Compiler and set " Compiler Compliance Level".

Please refer to the following links also for further reference -
1. http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=25121
2. http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=24116

Hope this helps.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
hahagal
Post subject:   PostPosted: May 30, 2012 - 06:08 PM



Joined: Apr 22, 2011
Posts: 97

Hi swapna,

A little confuse here....

WebSphere 7 is using JDK 1.6. And if I select Yes for the prompt, it create the projects with 1.5. When I Right click on your project and go to properties > Java Compiler, I saw this warning "When selecting 1.5 compliance, make sure to have a compatible JRE installed and activated (currently 1.6)...."

1) Am I correct to say WebSphere 7 is using JDK 1.6. If I am using WebSphere 7 for JavaEE 5.0 project, my compiler compliance level should be 1.6?

2) Is there any links between compiler compliance level and installed JREs?
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jun 01, 2012 - 09:55 AM



Joined: Nov 11, 2010
Posts: 2491

hahagal,

You can still deploy a Java EE 5.0 project to WAS 7.

For more detailed understanding of Installed JREs and Compiler Compliance level, please take a look at this link:
http://www.coderanch.com/t/531065/vc/Difference-between-Installed-JREs-Compiler

Hope this helps.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: Jun 05, 2012 - 12:02 PM



Joined: Mar 09, 2011
Posts: 916

hahagal,

To expand on what Swapna wrote, the JRE level and the Jave EE level are independent, to a degree. It is the JRE level that you are getting a warning dialog for. For example, you can use Java EE 5, with a 1.6 JRE, no problem.

You're right, Websphere 7 uses a 1.6 JDK (which has a 1.6 JRE). But you don't necessarily need 1.6 compliance for your project. That's up to you.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
support-piotr
Post subject:   PostPosted: Jun 06, 2012 - 02:45 PM



Joined: Feb 10, 2011
Posts: 84

hahagal,

There is ambiguity in Java Compliance level numbering. At some point in the past (after Java 1.4) Sun (now Oracle) decided to name next Java version 5.0. However, technically it was still Java 1.5. Thus Java 1.5 = Java 5.0, Java 1.6 = Java 6.0 and Java 1.7 = Java 7.0

_________________
Piotrek
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits