Find the answer to your Linux question:
Results 1 to 7 of 7
I am new to linux and I am trying to install J2sdk* (java compiller et all) on linux since it does not come pre-installed. On the web there are tons ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Location
    Atlanta
    Posts
    3

    Installing J2sdk* on linux


    I am new to linux and I am trying to install J2sdk* (java compiller et all) on linux since it does not come pre-installed. On the web there are tons of conflicting instructions on how to do it. One common tread amongst all the instructions is that I must put the path in my .cshrc file in my home directory. I have combed my home directory, there is no such file instead what I have is .bashrc file. I will appreciate it if any body who had gone through this problem or who knows precisely what I should do could give me a hint.

    Thanks
    elixxo29

  2. #2
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    This step allows you to execute javasdk commands without specyfing the full path to executable files (just like you do ls, cp, and so on instead of /bin/ls /bin/cp). In my .bashrc config file it is done like this:
    Code:
    PATH=$PATH:/usr/local/jdk1.5.0/bin
    As you can guess /usr/local/jdk1.5.0/ is path to the directory I installed java in.
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Location
    Atlanta
    Posts
    3
    I've tried your suggestion and I'm afraid it did not do the trick. I tried putting "set path=(/usr/java/j2sdk*/bin/ ) " in the csh.cshrc file after loging in as a su. It appeared to work but then some of the commands like ls, rm and so on were disabled by it.

    elixxo29

  4. $spacer_open
    $spacer_close
  5. #4
    Banned
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    1,120

  6. #5
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    Quote Originally Posted by elixxo29
    I've tried your suggestion and I'm afraid it did not do the trick. I tried putting "set path=(/usr/java/j2sdk*/bin/ ) " in the csh.cshrc file after loging in as a su. It appeared to work but then some of the commands like ls, rm and so on were disabled by it.

    elixxo29
    You have overwriten previous contents of path variable. Try this:
    Code:
    set path=($path /usr/java/j2sdk*/bin/)
    Please let me know whether it works.
    Regards
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

  7. #6
    Just Joined!
    Join Date
    Nov 2004
    Location
    Atlanta
    Posts
    3
    It works. Thank you very much. I ended up creating a file called java.csh in /etc/profile.d/, put the path (set (path=($path /usr/java/j2sdk*/bin/) ) in it (java.csh), and made it (java.csh) executable. And it works brilliantly. But it works for anybody using the C shell which is my immediate goal. My next goal is to make this compiler available to everybody who logs in irrespective of login shell.
    Any suggestions?

  8. #7
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    Well, you can just create symlinks for all applications in /usr/java/j2sdk*/bin/ to some widely used executables directory, preferably /usr/bin. This directory is contained by default in path by any shell I know of, so every user should have access to SDK tools. To to this just enter as root:
    Code:
    cd /usr/bin
    ln -s /usr/java/j2sdk*/bin/*
    There's another question if this is an 'ellegant' solution, but I'm 99.99% sure it'll work.
    Regards....
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

Posting Permissions

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