facebook

Java Compliance Level

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #326475 Reply

    hahagal
    Participant

    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

    #326476 Reply

    support-swapna
    Moderator

    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. https://www.genuitec.com/forums/topic/incompatible-java-compliance-leve/
    2. https://www.genuitec.com/forums/topic/why-am-i-getting-this-compiler-compliance-level-error/

    Hope this helps.

    #326492 Reply

    hahagal
    Participant

    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?

    #326574 Reply

    support-swapna
    Moderator

    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.

    #326734 Reply

    support-tony
    Keymaster

    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.

    #326809 Reply

    support-piotr
    Participant

    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

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Java Compliance Level

You must be logged in to post in the forum log in