Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
A little help here
I need a program (tomcat webserver) to startup as soon as the system boots up - before any users login because there might not be any users logging in and i still need to have that webserver up and running. Also it needs environment variables such as JAVA_HOME and CLASSPATH.Where can I put this startup script so that it starts as soon as the system boots up.
Money not an issue?
Where do you live and when are you not home?
I'm not gonna rob you, I'm just gonna steal some stuff

If you want to start something when the system is up, then put it in /etc/rc.d/rc.local!!! And if you want to set PATH and things like that, then add them in /etc/profile...
taurus

the thing is this program needs the JAVA_HOME variable before it can run.
I need a way of setting that variable before this program is run in rc.local
Money not an issue?
Where do you live and when are you not home?
I'm not gonna rob you, I'm just gonna steal some stuff

as taurus said, add the path to java home in the bottom of your /etc/profile.
PATH=$PATH:[path to Java]/bin
put this right in the bottom of the file, near your other path statements.
then like taurus said, you can add a call to the tomcat startup script at the bottom of your /etc/rc.d/rc.local file.
As far as tomcat needing the Java Home path, it should have found it on the install. there is a file you can edit, but i do not remember it. a simple but pain of a fix would be to simply download the jwsd from sun, and reinstall, one of the first steps on the install is to find the Java path and it does that automatically, assuming you have java installed aready. home this helps.
hippiejoe

Those things were giving me errors saying that JAVA_HOME was not set or something along those lines
but I managed to figure it out
just put the JAVA_HOME export line in the rc.local just before calling the tomcat startup script.thanks for the help.
Money not an issue?
Where do you live and when are you not home?
I'm not gonna rob you, I'm just gonna steal some stuff

![]() |
Linux Install help
|
SUSE 9.0 Newbie
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |