Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-22879

JavaEE jars files are built with another java version than used for compilation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • LATER
    • 4.2.3.Final, 4.4.0.Final
    • server
    • None
    • Hide
      • Download JBoss Developer Studio 10.0.0.GA
      • Add JBoss EAP 6.4 runtime to the studio.
      • Unzip attached test-project.zip into workspace
      • In Studio, use import existing projects wizard to import test-ejb and test-ear projects into workspace
      • Deploy test-ear project to JBoss EAP or alternatively export it with Export EAR wizard.
      • Inspect MANIFEST.MF and class files in the deployed/exported ear project.
      Show
      Download JBoss Developer Studio 10.0.0.GA Add JBoss EAP 6.4 runtime to the studio. Unzip attached test-project.zip into workspace In Studio, use import existing projects wizard to import test-ejb and test-ear projects into workspace Deploy test-ear project to JBoss EAP or alternatively export it with Export EAR wizard. Inspect MANIFEST.MF and class files in the deployed/exported ear project.
    • -

      I have installed system-wide JRE 8 in order to run all java applications with it. At the same time, out target platform is still based on Java 7 and that's why I've also downloaded JDK 7 and set JAVA_HOME path to it.

      When I build test-ejb project from attached zip file on command line, maven both compiles and packages it with JDK 7 obtained from JAVA_HOME. When I build the same project with JBoss Developer Studio which was configured via Window > Preferences > Java > Installed JREs to use JDK 7 by default, class files get version 51 (java 7) but Build-Jdk stanza in MANIFEST.MF is set to 1.8.0_102 instead of 1.7. I've also observed that test-ear project is also packaged with Java 8 instead of Java 7.

      This is not a big issue but is a bit worrying since for example jar tool from JDK 8 may contains bugfixes not present in JDK 7. This also makes me think that other tools may be fetched from wrong JDK version. Finally, I'm not even sure whether this is a JBoss Tools, Eclipse WTP or Eclipse M2E issue but it is clearly present in the latest stock version of JBoss Developer Studio.

            rob.stryker Rob Stryker (Inactive)
            mkalkov_jira Mikhail Kalkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: