• 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

Can I execute two java programs of different versions of java at the same time?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a project that only works under Java1.2. And now I need to impalement a screen capture tool for this program. However, I need to use Robot Class in Java 1.3 for the screen capture tool. My question is that can I execute two java programs of different versions of java platforms at the same time? If I can do that, can you explain to me that how can I do it? Or point out some articles or documentations, which might be useful for solving that problem?
 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What functionality of java1.2 are you using that isn't available in 1.3 (third party packages?)? I think the cleanest solution would be to port the 1.2 code to 1.3. Just a thought.
Sean
 
samuel, liu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to use Robot Class in Java1.3, which is not in java1.2. well, i wish i can make the decision to port the whole project from 1.2 to 1.3, but i can't.
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just install both versions of the JVM on your machine. Then, call the java.exe using an explicit path. For example:

c:\jdk1.2\bin\java.exe prog1

c:\jdk1.3\bin\java.exe prog2
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One other solution could be use an IDE for one project. Tell the IDE to use a particular version of Java(1.3 the newer one) and then keep using the old way to compile/run your older program -- which will still use the old one 1.2
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic