• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDK 1.4 & Tomcat 4.x and JDK 1.6 & Tomact 6.x on production sever

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am running JDK 1.4 & Tomcat 4.x on Windows Server 2003 and handling half million transactions per day.

Is it possible for me to install another JDK 1.6 and Tomcat 6.x on this production server while keeping Tomat 4.x and JDK 1.4 since other web apps need those old versions?

If possible, I plan to run some apps with JDK 1.4 & Tomcat 4.x as well as run some apps with JDK 1.6 & Tomact 6.x and Spring MVC at the same time.

Is it feasible or do you feel it’s risky? Any comments would be appreciated. Thank you!

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I understand correctly, yes BUT - each Tomcat instance would have to have a different environment variable for JAVA_HOME etc etc, and of course would have to be listening on separate ports.

You cant have two web servers both listening to the same standard port on one machine so that is the key problem.

Bill
 
Sang Lee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, each Tomcat will use different ports. What about JRE? Is it possible to run multiple JRE versions on one Windows Server?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can definitely keep multiple JDK (and JRE) versions on a Windows machine. Usually they end up as subdirectories under C:\Program Files\java. I have 4 on my Windows development box, including 2 1.5 releases and 1 each JDK and JRE 1.6 (not the same version). For Tomcat, just set the JAVA_HOME to point to the JDK (you can't use JRE's) for the Java release you want that version to run under. You CAN have multiple Tomcats using the same JDK version and thus JAVA_HOME's with the same value, lest there be any confusion.

The only really sticky thing is that Windows has GUI-controlled global and per-user environments, which can make it a little more difficult to keep multiple JAVA_HOME settings. Not a problem when launching from a command line, where you just jam in a SET JAVA_HOME before you launch Tomcat, but I'm less clear on how you'd do that when running Tomcat via the Service Manager.

Finally, remember that filenames with spaces in them cause problems, so it's better to use the 8.3 version of the filename when setting JAVA_HOME. Usually, but not always, the shortname form for "Program Files" is "PROGRA~1".
 
reply
    Bookmark Topic Watch Topic
  • New Topic