0

Sir I have an ERP, which runs catalina on tomcat. to run this i need java to be installed. Now my JAVA_HOME is usr/bin/java but i have a catalina.sh script which i want to run on boot. to do that i added the catalina.sh file in rc.local. but when the system boots it says JAVA_HOME variable needs to be declared. for that program it uses java from a different location.

for example: i need to run the file from: /home/ambee/jakarta/catalina.sh to run this file i need to show the java_home to: /home/ambee/jakarta/java but the system doesn't look for that on booting it goes to the default location of /usr/bin/java

Please give me a solution if possible.

thanks

1 Answer 1

1

Add export JAVA_HOME="/usr/bin/java" to the top of the file if you must use your script in rc.local,

A better alternative is to add . /path/to/yourscript.sh in the /etc/init.d/tomcat script under the start call, this literally includes your sh script.

From there just run with chkconfig tomcat5 on to start the services post boot.

Note however updates to tomcat that update the init.d script may break this change and you will want to move your script out of a home directory and into somewhere like /usr/share

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .