This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to run two class files in two different JVM? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to run two class files in two different JVM?" Watch "How to run two class files in two different JVM?" New topic
Author

How to run two class files in two different JVM?

Hemant Agarwal
Ranch Hand

Joined: Nov 21, 2005
Posts: 138
I have 2 jvm's installed.
I want to run two java classes
One from one vm
Another from the second vm.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41150
    
  45
It sounds like you would need two terminal sessions with different JAVA_HOME, PATH and CLASSPATH settings. What exactly is the problem you're facing?


Ping & DNS - my free Android networking tools app
Hemant Agarwal
Ranch Hand

Joined: Nov 21, 2005
Posts: 138
I have heard that it is possible in Java. I want to run two servlets in two different jvms. How is it possible?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41150
    
  45
It is possible the way I described it. If this is in a servlet context, you will need to have two instances of Tomcat (or whatever your servlet engine is) running, which implies that the two servlets will be accessible under different ports.

What is the actual purpose of running two different JVMs? Might it be sufficient to use different ClassLoaders instead?
[ January 09, 2006: Message edited by: Ulf Dittmer ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run two class files in two different JVM?
 
Similar Threads
web container on mutiple jvms
Accessing the managed bean
Same VM
configure catalina.out for per-app log file
Linkage Error while starting JBoss in eclipse 3.4 [Issue not occuring when I start JBoss from /bin]