5 Replies Latest reply on Oct 21, 2011 5:14 AM by jaikiran

    jdk dependency in jboss 6

    demarcojb

      Hi together,

       

      simple questions:

      Why jboss needs the dependency to the jdk and not to a jre? Which functionality is responsible for that?

      Which Library is needed from the jdk und why? tools.jar?

       

      thx and best regards

      Marco

        • 1. Re: jdk dependency in jboss 6
          jaikiran

          I thought we had removed that dependency long back (after 4.2.x?). What problems do you run into when you set JAVA_HOME to a JRE and start the server?

          • 2. Re: jdk dependency in jboss 6
            demarcojb

            Hi, thanks for replay.

            I tried exactly that. Point the JAVA_HOME to the jre and then I tested some jboss functions (f.e. starting jboss, jmx-console, jsp-Application...) and I didn't running into an error. But in den "Installation And Getting Started Guide" there is the following statement:

             

            "2.1.2. Configuring Your Java Environment

            You must have a working installation of JDK 1.5 or JDK 1.6 before you install JBoss Application Server."

             

            And in the further document the word JDK is often mentioned.

            f.e. "Create an environment variable called JAVA_HOME that points to the JDK installation directory".

             

            And also in the run.bat

            if "x%JAVA_HOME%" == "x" (

              set  JAVA=java

              echo JAVA_HOME is not set. Unexpected results may occur.

              echo Set JAVA_HOME to the directory of your local JDK to avoid this message.

            ) else (

              set "JAVA=%JAVA_HOME%\bin\java"

              if exist "%JAVA_HOME%\lib\tools.jar" (

                set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"

              )

            )

             

            So, if i understand you right, there is no dependency to the JDK (only jre is necessary) and there seems to be an error in the documentation? Do you know which functionality in the older Release (f.e. 4.02) needs the tools.jar?

             

            Thanks for your answer.

            • 3. Re: jdk dependency in jboss 6
              wdfink

              It's for compiling the web content (like JSP pages).

              For me it works fine with a JRE only, if I remember right since 4.x.

              • 4. Re: jdk dependency in jboss 6
                demarcojb

                ok; that's one point, that I also have in my mind. I've tested it now with a jre (not jdk) and jboss6 and the jsps are working.
                Seems that it works now with a JRE-Configuration, but then a modified Startscript and/or an offical statement from the jboss team is a good idea.

                Thanks to all, problem is solved...

                • 5. Re: jdk dependency in jboss 6
                  jaikiran

                  Marco Zanker wrote:

                   

                  ok; that's one point, that I also have in my mind. I've tested it now with a jre (not jdk) and jboss6 and the jsps are working.
                  Seems that it works now with a JRE-Configuration, but then a modified Startscript and/or an offical statement from the jboss team is a good idea.

                   

                  From the release notes of AS 4.2.0 http://sourceforge.net/project/shownotes.php?release_id=507793 :

                   

                   

                  A JavaSE 5 runtime is required to run JBossAS 4.2. A full JDK with tools.jar support is no longer needed by jboss, since JBoss Web packages the eclipse JDT compiler for compiling JSP pages and javassist has its own internal compiler. JAVA_HOME can point to a JRE, JBAS-4161.