You can set environment variables for a specific user in the ~/.bash_profile file. In the file you will see a section to add user defined variables, make sure to export that variable as well. You can set variables for all users in the same fashion by editing the /etc/profile file. The next time you log in these changes should take effect.
Jesse On Tue, 2003-03-18 at 22:28, Shawn wrote: > I'm trying to get setup for JSP development, but am hitting some snags. Can > someone see what I'm doing wrong? > > I've downloaded the J2SDK environment (J2RE-1.4.1_02), and have installed it > to /usr/java/j2re1.4.1_02 > I then set an environment variable with this command: > JAVA_HOME=/usr/java/j2re1.4.1_02 (the setup instructions state "set an > environment variable called JAVA_HOME to the pathname you installed the JRE > in" - not the exact words, but close) > Next, I downloaded and installed Tomcat to /usr/java/jakarta-tomcat-4.1.18 > Next, I tried to start Tomcat > (/usr/java/jakarta-tomecat-4.1.18/bin/startup.sh > > The script comes back and tells me the JAVA_HOME variable must be set. > However, when I issue the "set" command, I can see the JAVA_HOME variable > and see that it IS set. > > I have done all of this as root, so permissions shouldn't be an issue. > > Ok, I've made a bit of progress - I am trying to set the environment > variable from a terminal window in KDE. When I open another terminal > window, I don't have the JAVA_HOME variable defined. I tried to switch to a > virtual console (tty1) and ran the command "export > JAVA_HOME=/usr/java/j2re1.4.1_02" but still no luck. So I guess the > question is "How do I set a global environment variable from within KDE?" > I'm sure I can restart my server in a non-graphical mode and set the > variable that way, but I don't think this is the right solution..... > suggestions? Do I just need to add the command to a config file somewhere? > (I was only at the stage of testing the tomcat installation, not getting it > set for a server restart situation). > > Thanks in advance. > > Shawn > > (p.s. I even checked my "Red Hat 8 Linux Bible" book - nothing pertinent > stands out...) -- Jesse Kline, RHCT http://www3.telus.net/public/klinej/resume.html
signature.asc
Description: This is a digitally signed message part
