Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Setting environment variables


    I have installed tomcat on my computer. I have linux suse,
    And i am using bash. I have to set the JAVA_HOME variable.
    I have read about this in diffrent forums. But nothing of that
    worked for me. I have also notised that all the answers were
    diffrent. I asume that it depends on if you use suse or redhat.
    bash or some other shell. This is very frustrating because
    it is not easy to find correct information.
    I know about the file named .profile and i have tried setenv,
    export, env. I dont have time to experiment with this.

    So if anyone knows how to set the JAVA_HOME on suse
    using bash i would be happy.

    And if someone also know how to get information about
    this kind of stuff on some good webpage or in some book.
    Or if there is something in the helpbook on linux.

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    London, UK
    search for "java_home". topic has been covered SO many times.

    in addition, the tutorials section has plenty of information on the Linux command line.

  3. #3
    To set the environment variable in a script:
    export JAVA_HOME='/path/to/java'
    when a bash shell is invoked as a login shell it will read ~/.profile if invoked not as a login shell, it will read ~/.bashr

    It's a little more complicated than that, if you want to know, read "man bash" and search for "INVOCATION"

    bash references
    man page, has basically everything in it "$ man bash"
    bash howtos:

    hope that helps!

  4. $spacer_open

Posting Permissions

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