Thread: Java_home

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Madrid, Spain
    Posts
    0
    Rep Power
    0
    Trying to start tomcat at startup, cannot do it because I have manually write $ JAVA_HOME=/usr/local/jdk; export JAVA_HOME in a console window everytime I restart the machine.
    Linked tomcat.sh to rc.d and rc3.d, and renamed it as S96tomcat, but at startup, it cannot "see" java interpreter.
    How can I tell bash where to look for /usr/java/jdk. I did it in /etc/profile, /root/.bash_profile, but cannot see the path until I write JAVA_HOME everytime.

    Thanks,
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Washington DC, USA
    Posts
    156
    Rep Power
    14
    I'm having the same problem myself - set JAVA_HOME and CATALINA_HOME in the same files and Tomcat doesn't want to recognize them when I run the bin/startup.sh script. Can anyone help with this simple problem? I'm stumped!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    europe
    Posts
    287
    Rep Power
    13
    put this into ur /home/user/.bashrc or /home/user/.profile
    export JAVA_HOME='/path/to/java'
    then
    'source ~/.bashrc'
    try
    'echo $JAVA_HOME'
    to test if it is available

    java is used by users but normally not by root
    -on windows i dont know-
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Washington DC, USA
    Posts
    156
    Rep Power
    14
    That appeared to be the problem - I wasn't exporting the variables in my profile! Thanks a bunch.

IMN logo majestic logo threadwatch logo seochat tools logo