9 Replies Latest reply on Jun 17, 2006 7:54 AM by jukcoder

    Installing and runing JBoss without JDK

    arun_9033

      Hi All,

      I am newbie here. Just would like to clear my head on this:-

      Is it possible to install and run JBoss4.03 without JDK (valid version)?

      I understand that JBoss4.0.3 has an embedded tomcat that uses JDK for compliing JSP and servlets.

      JBoss won't start if don't have JAVA_HOME pointing a JDK on the machine.

      Any pointer to previous discussion or link appreciated.

      Regards
      Sunder

        • 1. Re: Installing and runing JBoss without JDK
          duffcase

          Hi.

          JBoss needs a JDK to run. The startups script is infact a jar.

          • 2. Re: Installing and runing JBoss without JDK
            arun_9033

            Thanks for the confirmation - this just came up after I read the Book JBOSS Developer Note Book where the author mentions

            " As of version 4.0.2, Tomcat ships with its own complier, so JBoss only requires a JRE Install."

            Does that mean JBoss shall use inbuilt Tomcat and it's jDK?

            Regards
            Sunder

            • 3. Re: Installing and runing JBoss without JDK
              duffcase

              I guess someone will arrest me if I'm spreading wrong information here.. :P

              I don't really know if you need a JDK on second look. I guess you just need a java VM.. so a JRE should be sufficient.

              • 4. Re: Installing and runing JBoss without JDK
                duffcase

                after some googling I found this product sheet.. It clearly states that one of the minimum requirements is a JDK

                http://www.seagullsoftware.com/assets/products/partner%20products/JBossASBrochure-Jun2005.pdf

                • 5. Re: Installing and runing JBoss without JDK
                  peterj

                  You do not need a JDK, only a JRE. It tried it, its works. My setup was Windows XP, JRE 1.4.2_11 and JBoss 4.0.4GA. I set JAVA_HOME to my JRE, cleaned out the temp and work directories under server/default, launched the server, and accessed my JSPs just fine.

                  Took me all of 2 minutes to verify that this was possible.

                  • 6. Re: Installing and runing JBoss without JDK
                    arun_9033

                    Thanks

                    This does work when using JBoss 4.0.4, how about the previous version of 4.0.2 where the tmp and work directories don't exist?

                    • 7. Re: Installing and runing JBoss without JDK
                      arun_9033

                      Actually I am mistaken, JAVA_HOME was pointing to the JDK directroy when it worked. When I change JAVA_HOME to point to the JRE directory, it doesn't work.

                      The run.bat file thats starts up JBoss requires the tools.jar file which is currently found in the JDK directory...

                      Can you please send me the batch file that your using... or the directory you have set JAVA_HOME to point to.

                      Thanks

                      • 8. Re: Installing and runing JBoss without JDK
                        peterj

                        Um, the tmp and work directories exist in 4.0.2 (and 4.0.3 and 3.2.6 and 3.2.7 and ...).

                        Here is how I set JAVA_HOME:

                        set JAVA_HOME=C:\Program Files\Java\j2re1.4.2_11


                        This is the default location where the JRE is installed.

                        The batch file is used is the run.bat that came with JBoss, no modifications. Here is the console output (abbreviated) for JBoss 4.0.2:

                        [d:\apps\jboss-4.0.2\bin]
                        >run -c servlets
                        Could not locate C:\Program Files\Java\j2re1.4.2_11\lib\tools.jar. Unexpected re
                        sults may occur.
                        Make sure that JAVA_HOME points to a JDK and not a JRE.
                        ===============================================================================
                        .
                         JBoss Bootstrap Environment
                        .
                         JBOSS_HOME: d:\apps\jboss-4.0.2\bin\\..
                        .
                         JAVA: C:\Program Files\Java\j2re1.4.2_11\bin\java
                        .
                         JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
                        .
                         CLASSPATH: C:\Program Files\Java\j2re1.4.2_11\lib\tools.jar;d:\apps\jboss-4.0.
                        2\bin\\run.jar
                        .
                        ===============================================================================
                        .
                        07:54:30,700 INFO [Server] Starting JBoss (MX MicroKernel)...
                        07:54:30,700 INFO [Server] Release ID: JBoss [Zion] 4.0.2 (build: CVSTag=JBoss_
                        4_0_2 date=200505022023)
                        07:54:30,700 INFO [Server] Home Dir: D:\apps\jboss-4.0.2
                        07:54:30,700 INFO [Server] Home URL: file:/D:/apps/jboss-4.0.2/
                        07:54:30,700 INFO [Server] Library URL: file:/D:/apps/jboss-4.0.2/lib/
                        07:54:30,700 INFO [Server] Patch URL: null
                        07:54:30,700 INFO [Server] Server Name: servlets
                        07:54:30,700 INFO [Server] Server Home Dir: D:\apps\jboss-4.0.2\server\servlets
                        
                        07:54:30,700 INFO [Server] Server Home URL: file:/D:/apps/jboss-4.0.2/server/se
                        rvlets/
                        07:54:30,700 INFO [Server] Server Data Dir: D:\apps\jboss-4.0.2\server\servlets
                        \data
                        07:54:30,700 INFO [Server] Server Temp Dir: D:\apps\jboss-4.0.2\server\servlets
                        \tmp
                        07:54:30,700 INFO [Server] Server Config URL: file:/D:/apps/jboss-4.0.2/server/
                        servlets/conf/
                        07:54:30,700 INFO [Server] Server Library URL: file:/D:/apps/jboss-4.0.2/server
                        /servlets/lib/
                        07:54:30,700 INFO [Server] Root Deployment Filename: jboss-service.xml
                        07:54:30,700 INFO [Server] Starting General Purpose Architecture (GPA)...
                        07:54:31,059 INFO [ServerInfo] Java version: 1.4.2_11,Sun Microsystems Inc.
                        07:54:31,059 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_11-b06
                        ,Sun Microsystems Inc.
                        07:54:31,059 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
                        07:54:31,434 INFO [Server] Core system initialized
                        
                        *** deleted lots of lines ***
                        
                        07:54:46,715 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-808
                        0
                        07:54:46,793 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                        07:54:46,809 INFO [JkMain] Jk running ID=0 time=0/47 config=null
                        07:54:46,825 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4
                        _0_2 date=200505022023)] Started in 16s:125ms


                        Opened a browser and accessed my application just fine. I did start with a fresh installation of JBoss with no tmp or work directories for the 'servlets' configuration, so the JSPs had to be compiled.



                        • 9. Re: Installing and runing JBoss without JDK
                          jukcoder

                          Jboss4.4 & Tomcat5.5 compiles jsp using Eclipse JDT compiler as the default. So you don't need Sun jdk unless you choose to use javac to compile your jsp by uncommenting:

                          <init-param>
                          <param-name>compilerSourceVM</param-name>
                          <param-value>1.5</param-value>
                          </init-param>


                          in /jbossweb-tomcat55.sar/conf/web.xml