How to configure Tomcat to use Java 7
If you're using Windows, this helps. Run Tomcat helper app (tomcatw.exe) and simply configure Java Virtual Machine DLL path under Java tab. Use default must be unchecked.
You answered your own question.! :)
All You need to do is link java 7 in your JAVA_HOME
.!
More Info Here
Edit : (Based on alfabravo's comment :
You can definitely change the pointer to JAVA_HOME
in your catalina.bat/sh
In Eclipse it is very easy to point Tomcat to a new JVM (in this example JDK7). My problem was I couldn't find where to do it. Here is the trick:
- On the ECLIPSE top menu FILE pull down tab, select NEW, -->Other
- ...on the New Server: Select A Wizard window, select: Server-> Server... click NEXT
- . on the New Server: Define a New Server window, select Apache> Tomcat 7 Server
- ..now click the line in blue and underlined entitled: Configure Runtime Environments
- on the Server Runtime Environments window,
- ..select Apache, expand it(click on the arrow to the left), select TOMCAT v7.0, and click EDIT.
- you will see a window called EDIT SERVER RUNTIME ENVIRONMENT: TOMCAT SERVER
- On this screen there is a pulldown labeled JREs.
- You should find your JRE listed like JDK1.7.0. If not use the Installed JRE button.
- Select the desired JRE. Click the FINISH button.
- Gracefully exit, in the Server: Server Runtime Environments window, click OK
- in the New Server: Define a new Server window, hit NEXT
- in the New Server: Add and Remove Window, select apps and install them on the server.
- in the New Server: Add and Remove Window, click Finish
Thats all. Interesting, only steps 7-10 seem to matter, and they will change the JRE used on all servers you have previously defined to use TOMCAT v7.0. The rest of the steps are just because I can't find any other way to get to the screen except by defining a new server. Does anyone else know an easier way?
TA, Jalkin