Find the answer to your Linux question:
Results 1 to 4 of 4
hi i have redhat 9 i installed tomcat 5 when i start this the shell says: The JAVA_HOME environment variable is not defined correctly This environment variable is needed to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2004
    Posts
    27

    environment variable JAVA_HOME for tomcat


    hi
    i have redhat 9
    i installed tomcat 5
    when i start this the shell says:

    The JAVA_HOME environment variable is not defined correctly
    This environment variable is needed to run this program

    how to set this environment variable?? I tried many priocedures, but none worked.
    Plz help

    Aparna

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    This has been covered so many times....

    Code:
    export JAVA_HOME=/your/path/to/java
    Jason

  3. #3
    Just Joined! coolguy-in's Avatar
    Join Date
    Sep 2004
    Posts
    21

    Re: environment variable JAVA_HOME for tomcat

    that means your JAVA_HOME is not set

    have you installed JAVA in your system (it should be j2sdk-1.4.X) for catalina 5.

    here are some steps to set your JAVA_HOME:
    enter it into /etc/profile file

    open your /etc/profile file and write this below HISTSIZE:

    JAVA_HOME=/YOUR/JAVA/PATH

    and now in export line add this JAVA_HOME
    it will look like

    export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME

    catalina detects the JAVA from JAVA_HOME environment variable so you need JAVA_HOME exported.
    now time to rerun your profile file so that it will be effective:

    source /etc/profile

    you can check if JAVA_PATH is effective with this command

    java -version
    it will show you the version of your java installed.

  4. #4
    Just Joined!
    Join Date
    Oct 2004
    Location
    California
    Posts
    3

    JAVA_HOME variable

    first lines of /etc/profile advise against changing instead the advice is to put changes into /etc/profile.local which does not exist...should /etc/profile.local be created. Tnx, jad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •