2 Replies Latest reply on Aug 30, 2002 5:42 PM by Ryan Delano

    Quick start template changes my JAVA_HOME

    Ryan Delano Newbie

      Hello JBoss People,

      I've made it through much of the quick start guide and many things are functioning. I have this problem in running the template build where my JAVA_HOME setting is getting replaced by JAVA_HOME\jre. I have worked with and even tried altering resources in the src\etc\bin directory (such as the run-client.sh file) but I just can't get this template example to leave my path for java.home alone!! Does anyone know where this change is being made? I stepped though build.xml but so far as I can tell the first use of java.home already has the \jre suffix being appended.

      To clarify, I'm running ant in my templates director, I have modified the .ant.properties file appropriately and have even tried defining java.home explicitly but no matter what I try my java_home is being altered to include a "\jre" suffix. I'm running all this on WinXP pro. I have Win2000 avb. on another machine if necessary. I'm running JDK 1.3.1_04.

      I also have a problem when I try to run the application where none of the javax classes can be found, but that should be due to the alterations to my java_home environment variables.

      Thanks for any information you may have.

        • 1. run-client.bat
          Ryan Delano Newbie

          I have one other related question-

          In the run-client.bat file that is generated when building the template example, does anyone know what the lines i bold are supposed to be including? (The italics show the "jre" that is being appended to my JAVA_HOME)

          @echo off

          set LCP=.
          REM Default locations of jars we depend on

          REM - RockinRyan - I had to modify this due to the space in "Program Files"
          REM - for %%i in (C:\Program Files\jboss-3.0.0_tomcat-4.0.3\client\*.jar) do call lcp.bat %%i

          for %%i in ("C:\Program Files\jboss-3.0.0_tomcat-4.0.3\client\*.jar") do set LCP=%LCP%;%%i

          for %%i in (..\..\lib\*.jar) do call lcp.bat %%i
          for %%i in (..\client\*.jar) do call lcp.bat %%i

          REM This automatically adds system classes to CLASSPATH
          if exist C:\DevTools\jdk1.3.1_04\jre\lib\tools.jar set LCP=%LCP%;C:\DevTools\jdk1.3.1_04\jre\lib\tools.jar

          echo C:\DevTools\jdk1.3.1_04\jre\bin\java.exe -classpath "%LCP%" test.client.TestClient

          C:\DevTools\jdk1.3.1_04\jre\bin\java.exe -classpath "%LCP%" test.client.TestClient

          I expect that I will just have to modify this file's bolded and italic'd lines to make it all work. Once you people clue me in as to what the bold lines are supposed to do. Thanks again,

          • 2. Re: run-client.bat - update
            Ryan Delano Newbie

            Okay, I still can't get the \jre to stay out of my JAVA_HOME path, which is annoying but I can manually override it. I decided to move my JBoss installation out of "Program Files" because the imbedded spaces definitely cause trouble. The workaround that I added to run-client was NOT sufficient - it does include the full path but it only picked up one jar file rather than looping.

            I still do not know what for %%i in (..\..\lib\*.jar) do call lcp.bat %%i is supposed to do, but the example and JBoss are working.