setting JAVA_HOME as a ..... var?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johan Louwers

    setting JAVA_HOME as a ..... var?

    I have a qustion. I have to set a JAVA_HOME variable on a Solaris9
    system...

    what kind of a variable?
    A system-defined.../....a user defined.../.....????

    and how do I set this so java can work with it? I need this to be
    used by Tomcat at a webserver.....

    Thanks already,
    Johan.

  • Neomorph

    #2
    Re: setting JAVA_HOME as a ..... var?

    On Wed, 03 Sep 2003 14:22:00 +0200, Johan Louwers
    <suntacNOSPAMPL EASE@dds.nl> two-finger typed:
    [color=blue]
    >I have a qustion. I have to set a JAVA_HOME variable on a Solaris9
    >system...
    >
    >what kind of a variable?
    >A system-defined.../....a user defined.../.....????[/color]

    An environment variable.

    set java_home="/usr/local/java/jsdk1.4.2/" ;
    export java_home ;

    Somewhere in the script that starts tomcat.

    It normally points at the base directory for the jdk or jre.
    [color=blue]
    >
    >and how do I set this so java can work with it? I need this to be
    >used by Tomcat at a webserver.....
    >
    >Thanks already,
    >Johan.[/color]

    Cheers.

    Comment

    • Johan Louwers

      #3
      Re: setting JAVA_HOME as a ..... var?

      Nope,
      it is not working when I use

      set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
      export JAVA_HOME;

      When i like to start tomcat using ./startup.sh I get the error:

      The JAVA_HOME enviroment variable is not definded this enviroment
      variable is needed to run this program.

      I placed the following command in the startup.sh script

      JAVA_HOME="/usr/local/j2sdk1.4.1_05";
      export JAVA_HOME;

      And tomcat is starting like this:

      #./startup.sh
      Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
      Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
      Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
      USING JAVA_HOME /usr/local/j2sdk1.4.1_05

      When i like to check if the service is runnig by connecting to
      http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
      page that the location can not be found.....

      So i do ./shutdown.sh and the following is reported:

      #./startup.sh
      Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
      Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
      Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
      USING JAVA_HOME /usr/local/j2sdk1.4.1_05
      Exception in thread "main" java.lang.NoCla ssDefFoundError :
      org/apache/catalina/startup/Bootstrap


      What is the problem? do you have any clue? Please help........


      On Wed, 03 Sep 2003 16:28:46 +0200, Neomorph
      <neomorph@nospa m.demon.co.uk> wrote:
      [color=blue]
      >On Wed, 03 Sep 2003 14:22:00 +0200, Johan Louwers
      ><suntacNOSPAMP LEASE@dds.nl> two-finger typed:
      >[color=green]
      >>I have a qustion. I have to set a JAVA_HOME variable on a Solaris9
      >>system...
      >>
      >>what kind of a variable?
      >>A system-defined.../....a user defined.../.....????[/color]
      >
      >An environment variable.
      >
      >set java_home="/usr/local/java/jsdk1.4.2/" ;
      >export java_home ;
      >
      >Somewhere in the script that starts tomcat.
      >
      >It normally points at the base directory for the jdk or jre.
      >[color=green]
      >>
      >>and how do I set this so java can work with it? I need this to be
      >>used by Tomcat at a webserver.....
      >>
      >>Thanks already,
      >>Johan.[/color]
      >
      >Cheers.[/color]

      Comment

      • John L. Webber

        #4
        Re: setting JAVA_HOME as a ..... var?

        Are you running the tomcat start/stop scripts directly from the
        tomcat/bin directory? That is,
        cd /usr/local/jakarta-tomcat-4.1.27/bin
        ../startup.sh




        Johan Louwers <suntacNOSPAMPL EASE@dds.nl> wrote in message news:<4eqdlv4vg 2kcsunv7u00tbr5 7q1c9mq2av@4ax. com>...[color=blue]
        > Nope,
        > it is not working when I use
        >
        > set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
        > export JAVA_HOME;
        >
        > When i like to start tomcat using ./startup.sh I get the error:
        >
        > The JAVA_HOME enviroment variable is not definded this enviroment
        > variable is needed to run this program.
        >
        > I placed the following command in the startup.sh script
        >
        > JAVA_HOME="/usr/local/j2sdk1.4.1_05";
        > export JAVA_HOME;
        >
        > And tomcat is starting like this:
        >
        > #./startup.sh
        > Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
        > Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
        > Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
        > USING JAVA_HOME /usr/local/j2sdk1.4.1_05
        >
        > When i like to check if the service is runnig by connecting to
        > http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
        > page that the location can not be found.....
        >
        > So i do ./shutdown.sh and the following is reported:
        >
        > #./startup.sh
        > Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
        > Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
        > Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
        > USING JAVA_HOME /usr/local/j2sdk1.4.1_05
        > Exception in thread "main" java.lang.NoCla ssDefFoundError :
        > org/apache/catalina/startup/Bootstrap
        >[/color]

        Comment

        • William

          #5
          Re: setting JAVA_HOME as a ..... var?

          "Johan Louwers" <suntacNOSPAMPL EASE@dds.nl> wrote in message
          news:4eqdlv4vg2 kcsunv7u00tbr57 q1c9mq2av@4ax.c om...[color=blue]
          > Nope,
          > it is not working when I use
          >
          > set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
          > export JAVA_HOME;[/color]

          Do you mean from the command line? If you're using c shell,
          the syntax would be:

          setenv JAVA_HOME "/usr/local/j2sdk1.4.1_05"

          P.S. You don't need the semicolons unless you're putting two
          shell commands on one line, and then only between the
          commands.

          -Wm


          Comment

          • Neomorph

            #6
            Re: setting JAVA_HOME as a ..... var?

            On Thu, 04 Sep 2003 10:49:07 +0200, Johan Louwers
            <suntacNOSPAMPL EASE@dds.nl> two-finger typed:
            [color=blue]
            >Nope,
            >it is not working when I use
            >
            >set JAVA_HOME="/usr/local/j2sdk1.4.1_05";
            >export JAVA_HOME;
            >
            >When i like to start tomcat using ./startup.sh I get the error:
            >
            >The JAVA_HOME enviroment variable is not definded this enviroment
            >variable is needed to run this program.
            >
            >I placed the following command in the startup.sh script
            >
            >JAVA_HOME="/usr/local/j2sdk1.4.1_05";
            >export JAVA_HOME;
            >
            >And tomcat is starting like this:
            >
            >#./startup.sh
            >Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
            >Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
            >Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
            >USING JAVA_HOME /usr/local/j2sdk1.4.1_05
            >
            >When i like to check if the service is runnig by connecting to
            >http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
            >page that the location can not be found.....
            >
            >So i do ./shutdown.sh and the following is reported:
            >
            >#./startup.sh
            >Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.1.27
            >Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.1.27
            >Using CATALINA_TMPDIR /usr/local/jakarta-tomcat-4.1.27
            >USING JAVA_HOME /usr/local/j2sdk1.4.1_05
            >Exception in thread "main" java.lang.NoCla ssDefFoundError :
            >org/apache/catalina/startup/Bootstrap
            >
            >
            >What is the problem? do you have any clue? Please help........[/color]

            That sounds like a typical java problem.

            Looks like the Tomcat classes (JAR files) need to be put into the CLASSPATH
            environment variable as well.

            Roady Green usually has a classpath explaining link in his repetoire, but
            basically, it works the same as the PATH, except you have to list the
            actual JAR files, not the directory they are in.

            Cheers.

            Comment

            • Dai Ichi

              #7
              Re: setting JAVA HOME as a ..... var?

              Just out of curiosity, did you change the JAVA_HOME variable in
              catalina.sh? That's what I did, and it works perfectly.

              Neomorph <neomorph@nospa m.demon.co.uk> wrote in message news:<gidelvgbr 3vonbct94apsdmt 905hg8cc9r@4ax. com>...[color=blue]
              > On Thu, 04 Sep 2003 10:49:07 +0200, Johan Louwers
              > <suntacNOSPAMPL EASE@dds.nl> two-finger typed:
              >[color=green]
              > >Nope,
              > >it is not working when I use
              > >
              > >set JAVA HOME="/usr/local/j2sdk1.4.1 05";
              > >export JAVA HOME;
              > >
              > >When i like to start tomcat using ./startup.sh I get the error:
              > >
              > >The JAVA HOME enviroment variable is not definded this enviroment
              > >variable is needed to run this program.
              > >
              > >I placed the following command in the startup.sh script
              > >
              > >JAVA HOME="/usr/local/j2sdk1.4.1 05";
              > >export JAVA HOME;
              > >
              > >And tomcat is starting like this:
              > >
              > >#./startup.sh
              > >Using CATALINA BASE: /usr/local/jakarta-tomcat-4.1.27
              > >Using CATALINA HOME: /usr/local/jakarta-tomcat-4.1.27
              > >Using CATALINA TMPDIR /usr/local/jakarta-tomcat-4.1.27
              > >USING JAVA HOME /usr/local/j2sdk1.4.1 05
              > >
              > >When i like to check if the service is runnig by connecting to
              > >http://10.99.1.115:8080 and I do NOT get anything :-( yeah a error
              > >page that the location can not be found.....
              > >
              > >So i do ./shutdown.sh and the following is reported:
              > >
              > >#./startup.sh
              > >Using CATALINA BASE: /usr/local/jakarta-tomcat-4.1.27
              > >Using CATALINA HOME: /usr/local/jakarta-tomcat-4.1.27
              > >Using CATALINA TMPDIR /usr/local/jakarta-tomcat-4.1.27
              > >USING JAVA HOME /usr/local/j2sdk1.4.1 05
              > >Exception in thread "main" java.lang.NoCla ssDefFoundError :
              > >org/apache/catalina/startup/Bootstrap
              > >
              > >
              > >What is the problem? do you have any clue? Please help........[/color]
              >
              > That sounds like a typical java problem.
              >
              > Looks like the Tomcat classes (JAR files) need to be put into the
              > CLASSPATH
              > environment variable as well.
              >
              > Roady Green usually has a classpath explaining link in his repetoire, but
              > basically, it works the same as the PATH, except you have to list the
              > actual JAR files, not the directory they are in.
              >
              > Cheers.[/color]

              Comment

              Working...