Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat 6 JAVA_HOME

Tags:

People also ask

Does Tomcat use JAVA_HOME?

To change the location of the Java Development Kit (JDK) that Apache Tomcat uses, one must set the JAVA_HOME variable that Tomcat reads.

Should JAVA_HOME point to JDK or JRE?

If you're doing any sort of development, or building with Maven or Ant, you need to point to the JDK (Java Development Kit) where utilities such as javac (the Java Compiler) reside. Otherwise, you can point to the JRE (Java Runtime Environment). The JDK contains everything the JRE has and more.

How can I set JAVA_HOME path?

To set JAVA_HOME, do the following: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.


I try to set the JAVA_HOME path as my Tomcat server is looking for it. I am trying to set it but it doesn't seem to work and causes an error when I do. I am trying to set the JAVA in the setclasspath.bat using

set JAVA_HOME="C:\Program Files (x86)\Java\jre7" 

This is at the start of the setclasspath.bat

set JAVA_HOME="C:\Program Files (x86)\Java\jre7" if not "%JAVA_HOME%" == "" goto gotJdkHome if not "%JRE_HOME%" == "" goto gotJreHome echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined echo At least one of these environment variable is needed to run this program goto exit 

When I set this and run "startup.bat start" it displays

Files was unexpected at this time

Can you help me?