Newbie PATH help
I am new to Linux and have been feeling my way around quite well. However when I tried to install Limewire on Fedora Core 2 I had problems as it said that there was no Java VM installed in my PATH? I had already installed the latest version of Java and checked to see that the VM worked in Firefox.
How and what do I need to do to change the PATH? I know it is in /etc/profile but what would I need to enter in the profile so that Limewire sees the java VM? Any help would be excellent and I hope one day I will be answering questions for the thousands of people that will soon be joing the community when they realise that monopolies are bad. |
Welcome to Linux & LQ !!
First, you can set the PATH for all users except root in /etc/profile, and also each user even root has their own .bash_profile file located in ~ (~ = home foler) where you set the path for that expecific user. To see your path you simple type: echo $PATH at the command prompt; the path is a variable where you tell "linux" in which directories it must search for binary files, there are other enviroment variables for library and stuff too.
Now, down to business :cool: Open a terminal, su to root(su -). then: cd /etc/profile.d/ , there you will create a file: "java.sh" : vim java.sh Using vim: type: "i" To insert, to start typing, then when you´re done press [Esc] + [Z] [Z] or press [Esc] and type :wq Ok, in your java.sh file you must put something like this: Code:
export J2RE_HOME=/java/j2re1.4.2_05 Now, if you want this new path to work in your current login, you simply do: source /etc/profile.d/java.sh Hope this helps, :jawa: :study: :jawa: |
|
Thanks
Thank you very much for your help sorry it took me so long to get back to you but just installed fedora core 3 and been going through the usual update thing with yum.
|
Not working!!
I have done exactly what you told me and everything worked fine in editing my $PATH, I also had a problem with gxine not seeing gtk2 so I added that as well. I know exactly where my files directory is i.e: /usr/java/j2re........
However when i then tried to install limewire I got the very same message in a terminal, that there was no JVM in my path!!!! any ideas? Thanks a lot for your time and for helping me. Bhambullet. |
Are you doing this as root ? If so when you changed to root did you do 'su' or 'su -' ?
If you do su you have root powers but not neccessarily root's path. 'su -' makes you root. I hope that makes sense. |
Reply
I logged in as root and did everything you told me to. I checked that the directory paths where correct but even though I have done this like you told me to I cannot get limewire or gxine to compile.
Is there anything else I can do? I am using Fedora Core test 3 with the 2.6.9 kernel |
Type the following at a command prompt as root and post the results
:- whereis libraryname echo $PATH Hopefully this will tell if these are correct or not. |
I ran into the same problem. It seems that there is a dummy java program installed by Fedora in at "/usr/bin/java". So, when you append the path as "export PATH=$PATH:$J2RE_HOME/bin", the new path does not override the old path since it does not come first. I changed that line to "export PATH=$J2RE_HOME/bin:$PATH", and found that the old path was properly overridden. By the way, you can see the full path of a program that would be called up by using the 'which' command, which program will be called up. For example, when I type 'which java', I get ''/opt/jdk1.5.0/bin/java'. Before I edited the /etc/profile.d/java.sh file, I got '/usr/bin/java'.
Good Luck Joe |
All times are GMT -5. The time now is 08:32 PM. |