• 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

Setting different JDK versions for Different webapp in Tomcat

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

I have 2 web-applications in Tomcat 5. Now for Java I have j2sdk1.4.2 & j2sdk1.3..

Now One of my application needs j2sdk1.4.2 while other can run only with
j2sdk1.3.. (This is an old project & there are java class package norms - like every class should be in a package to import it now. But earlier it was not strict).

Means this is absoulte for me to run one application with version 1.3 while other with 1.4.

But I can set Java_Home env. varibale only once. How can I tell my each web-application to take thier own jdk version in compiling & running.
Is this allowed in J2EE/Web-Containers.

Please suggest if there is any such setting which makes it possible.

THanks you all in advance...

Manoj
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that you can do this without running 2 instances of Tomcat. Tomcat is a Java program and any web applications running in a Tomcat instance run in the same JVM. You would have to specify different JAVA_HOME values in the batch file that launches each instance, and you would have to specify a different port for each instance to run on.

It is probably a better idea just to fix the uses of the default package and not bother with running 2 Tomcat instances.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Tomcat forum.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic