Results 1 to 9 of 9
Can someone explain to me how to add Java to the path?
I have tried several things, including re-installing Java. Mozilla recognizes it, and when I go to the Java ...
- 06-09-2007 #1Just Joined!
- Join Date
- Nov 2006
- Posts
- 14
Explaination needed to add java to path
Can someone explain to me how to add Java to the path?
I have tried several things, including re-installing Java. Mozilla recognizes it, and when I go to the Java website it verifies that I am using the latest jre1.6.0_01. it is located at:
usr/java/jre1.6.0_01
Aparently the syslink works, but limewire will not install (java dependencies).
The first time i Installed Mandriva 2007 free on a computer it worked without a hitch.
Trying to install it on a second computer has really been a bear. I have read, searched, experimented, etc. to no avail.
How do I know if Java is in my path?
If not, How do I put it there?
I have tried following the instructions posted on this forum, but nothing seems to work.
Still loving the Mandriva 2007, if I can get over this one hump... I will be thumbing my nose at Mr. Gates.
Thanks for the help!
- 06-09-2007 #2
You can copy the script below and place in /etc/profile.d (you need to be root), name it something like java.sh and make it executable
Code:chmod a+x /etc/profile.d/java.sh).
When you next logout and back in again, java will be in your path.export JAVA_HOME=/usr/java/jre1.6.0_01
export PATH=$PATH:/usr/java/jre1.6.0_01/bin export
MANPATH=$MANPATH:/usr/java/jre1.6.0_01/man
Hope this helpsI do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 06-09-2007 #3Just Joined!
- Join Date
- Nov 2006
- Posts
- 14
Explaination needed to add java to path
Ok.... I understand that part.
I have an existing java.sh file in the location mentioned, but.....
How do I edit it?
That is the question. Do I use a text editor? Tried that but wouldn't let me access the file, said I didn't have the right permissions.
- 06-09-2007 #4Just Joined!
- Join Date
- Nov 2006
- Posts
- 14
Explaination needed to add java to path
This is what is in My java.sh file now.
I noticed that the 3rd line is different. which is correct?
export JAVA_HOME=/usr/java/jre1.6.0_01
export PATH=$PATH:/usr/java/jre1.6.0_01/bin
export MANPATH=$MANPATH:/usr/java/jre1.6.0_01/man
- 06-09-2007 #5
you can gain root privileges with 'su' command.
EDIT: contents of java.sh file is correct.Code:su cp <path_of_java.sh> /etc/profile.d
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 06-09-2007 #6Just Joined!
- Join Date
- Nov 2006
- Posts
- 14
Explaination needed to add java to path
This is the results I get:
[root@localhost profile.d]# ls
10lang.csh* glib20.csh* mc.sh* qtdir3.sh*
10lang.sh* glib20.sh* menustyle.csh* screen.sh*
10mandriva-release.csh* inputrc.csh* menustyle.sh* ssh-client.sh*
10mandriva-release.sh* inputrc.sh* msec.csh* tmpdir.csh*
alias.csh* java.sh* msec.sh* tmpdir.sh*
alias.sh* kde3.sh* numlock.sh* xhost.csh*
configure_keyboard.sh* less.csh* python.csh* xhost.sh*
gconf.csh* less.sh* python.sh*
gconf.sh* mc.csh* qtdir3.csh*
[root@localhost profile.d]# cp /etc/profile.d/java.sh> /etc/profile.d
bash: /etc/profile.d: Is a directory
[root@localhost profile.d]#
- 06-09-2007 #7where did you save java.sh file?cp /etc/profile.d/java.sh> /etc/profile.d
you have to copy java.sh file to /etc/profile.d folder.
i assume that java.sh file is on Desktop. execute this
type correct path of java.sh file.Code:su cp ~/Desktop/java.sh /etc/profile.d
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 06-09-2007 #8I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 06-10-2007 #9Just Joined!
- Join Date
- Nov 2006
- Posts
- 14
Explaination needed to add java to path
Ok guys,
Thanks for all the help.. got it figured out.... then downloaded frostwire (It's better than Limewire!!!!!)
works like a charm..... Life is good!!!
Thanks for the help
Michael


Reply With Quote

