LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-13-2002, 08:57 PM   #1
yevbo23
LQ Newbie
 
Registered: Dec 2002
Posts: 19

Rep: Reputation: 0
Java bash Mandrake9


Hello, I am trying to set a classpath for Java (java resides in /usr/java/j2sdk1.4.0_03/bin/ in my case) in Mandrake9. How do I do it? Do put this line:

export PATH=$PATH:/usr/java/j2sdk1.4.0_03/bin/

in both or either:

1.) /etc/bashrc
2.) /etc/profile

and if yes, then where exactly in file? As you've probably guessed by now, I am using bash shell. Thanks for your help!

--Gene
 
Old 12-13-2002, 10:46 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Not /etc/bashrc, but rather ~/.bash_profile

And it depends on your wants, if you want this to be in the path for all users, then I'd stick it in /etc/profile, but if you want it for specific users only, then the bash_profile is for that.

Cool
 
Old 12-13-2002, 10:57 PM   #3
yevbo23
LQ Newbie
 
Registered: Dec 2002
Posts: 19

Original Poster
Rep: Reputation: 0
so where exactly in the file do I stick it? Because there is code that I am not sure I understand very well...
 
Old 12-13-2002, 11:32 PM   #4
jdc2048
Member
 
Registered: Jul 2002
Location: Ohio, USA
Distribution: Redhat, Gentoo, Solaris, HP-UX, etc...
Posts: 391

Rep: Reputation: 30
It doesn't really matter, unless you stick it in an "if, then, else" structure. You can place it at the end of the file and should not have any problems.

You mentioned you were trying to set "classpath" though. If this is the case you want to make it:

export CLASSPATH=$CLASSPATH:/usr/java/j2sdk1.4.0_03/bin/

However if you were just trying to set the PATH to the java executable, then what you had is correct.
 
Old 12-13-2002, 11:48 PM   #5
yevbo23
LQ Newbie
 
Registered: Dec 2002
Posts: 19

Original Poster
Rep: Reputation: 0
Hmmphh, I put my thing in /etc/profile, and now i can't login into either KDE or GNOME, only IceWM works, and even there in shells I can't do anything, not su or ls or anything... How I fix it?
Thanks...
 
Old 12-14-2002, 12:12 AM   #6
yevbo23
LQ Newbie
 
Registered: Dec 2002
Posts: 19

Original Poster
Rep: Reputation: 0
Never mind, logged in as a root, removed this stuff, now everything works.
Grrr...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring Bash (.bashrc) for use with Java Sir Nerdalot Linux - General 2 11-13-2005 09:42 AM
Mandrake9.2, bash: /cannot execute binary file premier_la Linux - Software 10 01-23-2004 03:53 AM
Java, Tomcat, Apache2.0.47, Mandrake9.2 help lazat Linux - Software 6 12-16-2003 09:33 AM
java path in bash matador Mandriva 2 12-03-2003 09:51 AM
Mandrake9/Java-VM ZoneAlert Linux - Newbie 2 03-09-2003 10:11 AM


All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration