3 Replies Latest reply on Jan 21, 2008 11:50 AM by Peter Johnson

    Using Solaris JDK

    Josep Abenza Newbie

      Hi all.

      I've installed JBoss 4.0.5.GA on Solaris 10 using a new-installed jdk (jdk1.5.0_11) and it works without problems. However, I've discovered that solaris 10 comes with a pre-installed JDK, in package SUNWj5rt

      $ pkginfo -l SUNWj5rt
      PKGINST: SUNWj5rt
      NAME: JDK 5.0 Runtime Env. (1.5.0_11)
      CATEGORY: system
      ARCH: sparc
      VERSION: 1.5.0,REV=2004.12.07.00.07
      BASEDIR: /usr
      VENDOR: Sun Microsystems, Inc.
      DESC: Java Platform virtual machine and core class libraries
      PSTAMP: tiger-sparc20061215052356
      INSTDATE: Jun 15 2007 10:46
      HOTLINE: Please contact your local service provider
      STATUS: completely installed


      This JDK seems to be incomplete (for instance, there's no 'lib' folder), and I'm not sure if it can be safely used to run JBoss. If it is, it would be easier to just use it, since the patching and upgrading will be done when patching solaris.

      I've tried to start jboss using run.sh, and I get this warning:

      run.sh: Missing file: /usr/jdk/jdk1.5.0_12/lib/tools.jar
      run.sh: Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE.

      After the warning, JBoss seems to start, but I don't know what problems I could get in the future. Any help would be appreciated.

      Regards,
      Josep

        • 1. Re: Using Solaris JDK
          Peter Johnson Master

          I don't have Solaris so I am just venturing a guess. Considering that Sun develops Solaris and Java, I would guess that SUNWj5rt is an official JRE (Java Runtime Environment), that is, the say JRE you would download from the Sun Java web site. This is in contrast to Linux distributions which come a pseudo-JVM that is not fit to run JBossAS (in which case you need the JDK from Sun).

          The error your got is because JBossAS really prefers to run with a JDK (which includes the compilers and tools). In ancient times (say 3 or 4 years ago), web containers (such as Tomcat) required a JDK to compile the JSPs found in web applications, and the check for a JDK is still in the startup scripts. You should not have any problem using the JRE unless you are using, in one of your applications, a Java library that needs it.

          • 2. Re: Using Solaris JDK
            Josep Abenza Newbie

            Hi Peter. Thanks for your reply.

            Just a question. If I have understood you right, nowadays you don't need to compile the JSPs using .../lib/tools.jar? Will JBoss run without problems in my case, in which there's no tools.jar?

            About the SUNWj5rt, if we believe what the package says, it's not a JRE but a JDK (whatever that means, since there's no /lib directory or things like javac.sh...)

            NAME: JDK 5.0 Runtime Env. (1.5.0_11)


            Again, thanks for your time.

            • 3. Re: Using Solaris JDK
              Peter Johnson Master

              We have run JBossAS just fine with a 1.5 JRE.

              The name is really weird. JDK of course implies it comes with the compiler, but then it qualifies that by saying "Runtime Env." which implies only the runtime portion. On Windows, when you install the JDK, the JDK gets installed in one locaton and the JRE in two locations (under the JDK, and in a second location under Program Files), though the Linux JDK install does not show this dichotomy. Not sure if there is another location on your machine where the whole JDK resides.