LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-01-2001, 04:08 PM   #1
rw
LQ Newbie
 
Registered: May 2001
Posts: 3

Rep: Reputation: 0

Just installed a new Java SDK and need the system PATH, CLASSPATH, and JAVA variables to point to the new location permanently. If I enter "SET" @ the cmd prompt the data I want to change is displayed - is this an editable file stashed somewhere?

I have tried to use SET as a verb (SET PATH=blah-blah) but it ignores me, su, and root.
 
Old 05-01-2001, 10:19 PM   #2
Damicles
LQ Newbie
 
Registered: Oct 2000
Location: Burlington/Whitewater, WI
Distribution: Slackware
Posts: 19

Rep: Reputation: 0
I assume you are using csh or tcsh if you're using the "set" command. In order to add another path, the command is:

set path = ( $PATH /your-path-here )

of course if you're using bash the command would be:

export PATH = $PATH:/your-path-here

hope this helps

 
Old 05-02-2001, 10:58 AM   #3
rw
LQ Newbie
 
Registered: May 2001
Posts: 3

Original Poster
Rep: Reputation: 0
almost...

think i'm using bash - new 2 linux - am using mandrake 7.2.
what i really want to do is change a few things such as CLASSPATH, JAVA, and the path - all of which currently point to the java runtime included with mandrake. these settings are all viewable via SET and enter - does SET read a "config" file? if it does - where is it and whats its name?

thanks
 
Old 05-02-2001, 12:15 PM   #4
Damicles
LQ Newbie
 
Registered: Oct 2000
Location: Burlington/Whitewater, WI
Distribution: Slackware
Posts: 19

Rep: Reputation: 0
If you're using bash, all the environmental variables would be saved in the .bashrc file in your home directory.

You may want to check out this site for more info on Java for Linux:

http://www.blackdown.org/

I am currently using the JDK from here, which didn't need to set any of those paths. You might want to check it out . . .

 
Old 05-02-2001, 01:11 PM   #5
rw
LQ Newbie
 
Registered: May 2001
Posts: 3

Original Poster
Rep: Reputation: 0
.bashrc !

maybe that's it - i'll chk my lnx box @ home tonight.
new to java as well - dl'd the jdk and forte ide from sun to my win98 work box and wanted to make it easier on myself w/the same envrnmnt on my lnx box. checked blackdown - if all else fails will switch - recommend any of their ide's?

thanks for your help
 
Old 07-10-2001, 11:23 AM   #6
cubed
LQ Newbie
 
Registered: May 2001
Location: Tokyo, Japan
Distribution: Red Hat 7.0, 7.1
Posts: 29

Rep: Reputation: 15
I use Forte for Java with windoze and it's well slow. I use Forte mostly for the ntt docomo doja api extensions (mobile devices) and I recommend avoiding IDEs unless you're doing big projects - sure install it and try it but the speed penalty is big.

Unfortunately most of these big IDEs are slow whatever platform and Linux is no exception (although probably quicker than the other OS).

Automated garbage collection in Forte is the main culprit and it's best to do it yourself rather than leaving it up to the IDE which just does it whenever it feels like it .

I'm looking for a small and quick IDE with minimal features for the write, compile, execute cycle. There's a few for windows but can't find any for linux. It may well be worth making one as the speed penalty from a command line or script is minimal for the java programs I've executed on linux (definitely quicker than the other OS).

This is how I configured my environment variables in /etc/profile file :
Code:
if [ -z "$INPUTSRC" -a ! -f "$HOME/.inputrc" ]; then
      INPUTRC=/etc/inputrc
fi

export CLASSPATH="./"
if [ -d /usr/jdk1.3 ]; then
      PATH="$PATH:/usr/jdk1.3/bin"
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE
INPUTRC


for i in /etc/profile.d/*.sh ; do
            if [ -x $i ]; then
And that worked fine.

For the Forte IDE I have to specify where the jdk is which I just did with a script for flexibility. Something like :

Code:
./runide -javahome="/usr/jdk1.3"
and saved it in the /usr/bin as forte.

I'm having a couple of problems getting the compilers in Forte to work with my files because of file permissions but that's another problem ...

Hope this helped.
cubed
 
Old 07-11-2001, 11:17 AM   #7
cinnix
Member
 
Registered: Jun 2001
Location: Northern Ohio
Distribution: RedHat, Engarde and LFS
Posts: 237

Rep: Reputation: 30
Quote:
Originally posted by Damicles
I assume you are using csh or tcsh if you're using the "set" command. In order to add another path, the command is:

set path = ( $PATH /your-path-here )

of course if you're using bash the command would be:

export PATH = $PATH:/your-path-here

hope this helps

I don't know if this works on every system or if the way I do it is just another method but I do things this way

PATH=$PATH:/your/new/path
when I need to change the PATH variable

and

VARIABLE=variablesetting ; export variable
example
MAIL=$HOME/mail ; export MAIL
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change environment variables of a parent envrionment from a child one. pulsez Linux - Software 1 11-09-2005 06:24 AM
environment variables in c++ s3b0 Programming 6 08-27-2004 09:19 AM
environment variables kakridge Linux - Newbie 1 07-14-2003 06:25 PM
environment variables change in X Baloney Pete Slackware 1 01-19-2003 02:40 PM
environment variables moeminhtun Linux - General 4 01-15-2003 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:23 AM.

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
Open Source Consulting | Domain Registration