IwantToKnow
IwantToKnow

Reputation: 371

Having trouble starting tomcat with a different JAVA_HOME

I want to start my tomcat with a different java version than the "standard one". On my server java 6 is installed (java -version returns: java version "1.6.0_34") I also downloaded a java 7 jdk and put it to /opt/oracle/7/jdk1.7.0_55/ and wanted my tomcat to run with java 7. So I added export JAVA_HOME=/opt/oracle/7/jdk1.7.0_55 to my script /etc/init.d/tomcat7.

When I try to start my tomcat via sudo /etc/init.d/tomcat7 start I get /opt/tomcat7/bin/catalina.sh: 1: eval: /opt/oracle/7/jdk1.7.0_55/bin/java: not found

But when I type ll /opt/oracle/7/jdk1.7.0_55/bin I get -rwxr-xr-x 1 root root java* So the path should be correct!?

I can't figure out why it doesn't work. Any hints appreciated. :-)

EDIT: I probably just downloaded the wrong jdk (32 bit instead of 64)

Upvotes: 0

Views: 113

Answers (1)

Aaron Digulla
Aaron Digulla

Reputation: 328594

You probably downloaded the wrong JDK. From your comments, it seems to be a 32bit JDK. If you have a 64bit Linux, then you can't load the executables.

uname -m tells you the architecture of your system. It should be i686 or i586 but probably is x86_64.

Upvotes: 1

Related Questions