On Thursday 30 January 2003 15:02, Ted Gervais wrote: > On Wednesday 29 January 2003 10:42 pm, John P Verel wrote: > > > > > I don't want to be critical here, but was just wondering if it is > correct to put this path statement in the /etc/profile file? Isn't the > /home and /root .bashrc and .bash_profile files used for that? > > Just wondering??? > > > I have this in /etc/profile: > > > > if ! echo $PATH | /bin/grep -q > > "/usr/X11R6/bin:/usr/java/jdk1.3.1/bin"; then > > PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3.1/bin" > > > > This makes the jdk available to all users. It also eliminates the > > potential for appending the java sub-path more than once, which can > > easily happen with an out of the box Red Hat install. > > > > John > > > > On 01/29/03 09:25 +0000, Stephen Cox wrote: > > > Thanks for your help j.post that did it. > > > > > > >Edit .bashrc in your home directory and add this line: > > > > > > > >PATH=$PATH:/usr/java/j2sdk1.4.0/bin > > > > > > > >(assuming you have version 1.4.0--change the path to wherever the > > > > java SDK was installed.) Then restart your desktop GUI. > > > > > > When I asked this at a forum I got told to put that line in > > > .bash_profile, should I remove the line from there (because it > > > didn't work)? Also I was told to make a link of java and javac and > > > but them in /usr/local/bin. Are they still needed? > > > > > > Lastly, when I tried to install the Studio ONE IDE it wanted to > > > install it inside /root. Where should I put it if I want all users > > > to be able to access it? > > >
Here is one way to make it available to all users provided they use a bash like shell. I'll assume Sun's j2sdk1.4.1 is installed in /usr/java otherwise you'll have to change the paths. Create a file /etc/profile.d/java.sh with the following contents #!/bin/sh # Set up paths for java # /usr/java contains the current java sdk export JDK_HOME=/usr/java/j2sdk1.4.1 export JAVA_HOME=/usr/java/j2sdk1.4.1 PATH=$PATH:JDK_HOME/bin Make it executable chmod 755 /etc/profile.d/java.sh Log out and back in. -- --------------------------------------------------------------------- Tony Molloy. e-mail: [EMAIL PROTECTED] Systems Manager. Dept. of CSIS. Phone: +353-61-202778 (DL) Univ. of Limerick. +353-61-333644 ext. 2778 Ireland. Fax: +353-61-202734 --------------------------------------------------------------------- -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list