Find the answer to your Linux question:
Results 1 to 8 of 8
I need to add a classpath to my FC 6 server (for JAVA). I already tried echo $CLASSPATH and env and got no results for it I did CLASSPATH /path/path/path ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    109

    Question Adding a classpath???


    I need to add a classpath to my FC 6 server (for JAVA).

    I already tried echo $CLASSPATH and env and got no results for it

    I did

    CLASSPATH /path/path/path

    and it worked, but when I sign off of my SSH session it isn't there when I get back. How do I make it there permanently???

  2. #2
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    It depends on the shell you are using. You could set your environnement variable in your .profile (for bash). It will be executed when you login.

    Hope this helps.

  3. #3
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    109

    Question

    I could do that, but then I would have to do that for every user. Isn't there a way to add a system wide classpath available to all users??

  4. #4
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    Sure. For bash, add the line into /etc/profile. This is the system-wide .profile. It will apply for every user.

  5. #5
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    109

    Question

    Ok...I'll try that...do I need to restart the server for it to take effect??

  6. #6
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    Nope. It will take effect when you next login. There shouldn't be any need to reboot a linux/bsd machine unless you update the kernel

  7. #7
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    109

    Thumbs up

    sweet, that worked great! Thanks!

  8. #8
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    It's been a pleasure

Posting Permissions

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