Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16
hi anshul !! Originally Posted by anshul some time back i was doing some thing then something happened wrong please explain a bit more.... are you logged in as normal ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729

    hi anshul !!

    Quote Originally Posted by anshul
    some time back i was doing some thing
    then something happened wrong
    please explain a bit more....

    are you logged in as normal user ?? .bash_profile of root gets executed when root log in... its not for normal users... set this path in /etc/bashrc . its for all users... including root....
    Last edited by devils casper; 01-02-2008 at 09:56 AM.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  2. #12
    Just Joined!
    Join Date
    Aug 2006
    Posts
    22

    Thumbs up

    thnx 4 reply
    yes i logged on using user account not root account
    n typed
    #printenv
    that path was not there then i logged on using root account
    i put
    #printenv
    path was there it is coming like that
    /root/bin:=/usr/java/j2sdk1.4.2_11
    then i went to ../jboss/bin n ran
    #sh run.sh
    but it didnt start
    in the starting it says
    run.sh: Missing File: /lib/tools.jar
    run sh. Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE.

    i checked /etc/bashrc it is clearly written there that if u want to set system wide environment then edit /etc/profile and u also said that this before
    plz try to clear my concepts
    any way i put that path in /etc/bashrc n i can c that path in printenv output command 4 every1
    but i m getting the same problem i mean
    #sh run.sh
    but it didnt start
    in the starting it says
    run.sh: Missing File: /lib/tools.jar
    run sh. Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE
    instead of putting this IN etc/bashrc
    #PATH=$PATH:$JAVA_HOME=/usr/java/j2sdk1.4.2_11
    #export PATH
    i put
    #JAVA_HOME=/usr/java/j2sdk1.4.2_11/
    #export PATH=$JAVA_HOME/bin:$PATH
    I DONT KNOW WAT IS THE DIFFERENCE B/W UR ONE N THIS ONE
    n later is working despite of getting this error error? no idea
    #sh run.sh
    but it didnt start
    in the starting it says
    run.sh: Missing File: /lib/tools.jar
    run sh. Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE

    but plz tell me wat is d differnce b/w them
    n yes path is there for all users including root
    please tell me bout this path environment
    thnx n regards
    cheers

  3. #13
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    hi anshul !!

    #PATH=$PATH:$JAVA_HOME=/usr/java/j2sdk1.4.2_11
    #export PATH
    i put
    #JAVA_HOME=/usr/java/j2sdk1.4.2_11/
    #export PATH=$JAVA_HOME/bin:$PATH
    there is no difference except that you are adding bin
    suppose PATH = "xyz"

    PATH = PATH + ( b = "def" )
    now PATH is "xyzdef"
    or
    b = "def"
    PATH = PATH + b/bin

    first case uses inline concatenation of strings and in second, assign and then concatenate + /bin.......

    the main this is value of PATH variable
    $ echo $PATH
    whenever you execute any command or application, system search command file in the folders listed in PATH variable. you can set this PATH variable in a lot of files.
    e.g.
    /etc/bashrc......... this is for system wide setting
    user's .bash_profile... this is exclusively for user only, like root or any other user.

    run.sh: Missing File: /lib/tools.jar
    run sh. Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE
    post the output of
    $ echo $PATH
    and contents of run.sh
    Last edited by devils casper; 01-02-2008 at 09:59 AM. Reason: removed extra signature
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. $spacer_open
    $spacer_close
  5. #14
    Just Joined!
    Join Date
    Aug 2006
    Posts
    22

    thanks dear

    hi casper
    sorry dear i didnt reply in time by the way i got it working using ur instructions i put that path in /etc/bashrc file now i dont have to type path
    thank you
    regards
    anshul

  6. #15
    Just Joined!
    Join Date
    Jan 2008
    Location
    Chandigarh
    Posts
    1

    Thanks!!!!!!

    Thanks man! the env variable related stuff u told was really helping , And gotta tell u somethin , actually i wil be 1 year old ,after one year ,on this forum, u know why!
    and i m in chandigarh too!!

  7. #16
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi and Welcome !

    Glad to help you. If you have any question, dont hesitate to start a new thread.
    Happy New Year !
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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