Questions about modifying bash_profile values, export, etc.
My end goal: be able to use jar command from any directory i choose.
I am trying to follow instructions for unzipping a war using the jar command, Code:
mkdir -p /tmp/my_ear I have been googling all day how to update the ~/.bash_profile using export $PATH... Can someone please help walk me through the correct steps to do this? I am not sure if the path should point to the JRE, the JDK or both, but more importantly I just am new to modifying the .bash_profile. I have made a couple of my own aliases for jumping to commonly used directories, but that is about it so far! From what I have found, it looks like this will be the path I use when updating the bash_profile - how can I confirm? Code:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin Code:
PATH=$PATH:$HOME/bin Thanks, s |
Quote:
Code:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/jre Quote:
Code:
PATH=$PATH:$HOME/bin:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin |
aaahhhahahahaa i love the name :) thanks suicidaleggroll!
SO.. it still does not work... do I need to reboot the server or re login for the updated path to work? I did: nano ~/.bash_profile updated the line per your advice exit & saved confirmed it was changed went back to the directory i want to unzip the jar into and tried: jar -xvf /u01/app/oracle/product/fmw/Oracle_WC1/archives/applications/webcenter.ear but got this error: -bash: jar: command not found |
You need to either log out and back in, or source the file in order for the changes to take effect:
Code:
source ~/.bash_profile |
Quote:
:{:{:{ |
What's the result of "echo $PATH"?
|
How do I tell?
Quote:
|
Well your path has been modified correctly, if the program is there it should be running it. Make sure the jar command is located there by running:
Code:
ls -l /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin |
what does ls -l /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin yeild ?
|
would it be a file literally called "jar" in that directory?
Quote:
|
Quote:
|
Well now I just feel stupid. I guess the trick now is finding that jar! Thanks guys.
I'm trying to locate it, using locate or find, but I don't want to return a list of .jar files... and there are a lot! |
Nm I used this:
find / -name jar Found it: /u01/app/oracle/product/fmw/Oracle_WT1/jdk/bin/jar |
Quote:
|
It worked :) You rock!
|
All times are GMT -5. The time now is 10:40 PM. |