Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Running dual jvm's 1.4 1.5

Thread view: 
frank - 03 Feb 2006 15:13 GMT
I asked this before but I think I did not ask the question completely.

I need to run 2 version of java JVM/JDKs , 1.4.x and 1.5 on the same XP
machine but have different programs running using the different JVMs/JDK
compiles.  Is this do able and any know issues.  I know on Linux/Unix
probably no biggy.  But on Windows XP the installer takes control and
loads things into the system32 automatically for you with the new
version installed.  Are their different dll's required for the different
versions of java and if so how do you keep it separate.  Is it just as
easy as overlaying the system32 java.exe with the 1.4?

I NEED the system's default to stay at 1.4 java (don't want to screw
around with lots of other already setup and running program that are not
mine) but load a 1.5 that others can use.  I overlaid the 1.5 java in
the system 32 with the 1.4 java and got an error when running of:

Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.5', but '1.4' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.

Looks like I screwed up the registry by doing it.  Boy  hate windows
this would be so easy on Linux!
Daniel Dyer - 03 Feb 2006 15:35 GMT
> I asked this before but I think I did not ask the question completely.
>
[quoted text clipped - 6 lines]
> versions of java and if so how do you keep it separate.  Is it just as  
> easy as overlaying the system32 java.exe with the 1.4?

Was there any reason you couldn't use the approaches suggested last time  
you asked?

http://groups.google.com/group/comp.lang.java.programmer/browse_frm/thread/f73e5
7b6bf318291/4b6a9e8c7c4aaba1


Read Mike's suggestion, which I believe is the best approach.  My reply to  
his post suggests how you might go about doing it (it's the way I do it on  
both Windows and Linux).  If it's not clear, just ask.  Roedy also posted  
a link to a list of alternative approaches (Mike's suggestion is no. 3 on  
the list)

Are you sure you can't just use the 1.5 JDK to compile and run your 1.4  
applications?

Dan.

Signature

Daniel Dyer
http://www.dandyer.co.uk

Oliver Wong - 03 Feb 2006 17:24 GMT
>> I asked this before but I think I did not ask the question completely.
>>
>> I need to run 2 version of java JVM/JDKs , 1.4.x and 1.5 on the same XP
>> machine but have different programs running using the different JVMs/JDK
>> compiles.
[snip]

> Are you sure you can't just use the 1.5 JDK to compile and run your 1.4
> applications?

   I believe the 1.5 JVM can run 1.4 applications even without a recompile,
so it should be even easier than Dan is suggesting (which was already pretty
damn easy).

   - Oliver
Roedy Green - 03 Feb 2006 23:41 GMT
>    I believe the 1.5 JVM can run 1.4 applications even without a recompile,
>so it should be even easier than Dan is suggesting (which was already pretty
>damn easy).

The 1.5 JVM will even run ancient 1.1 and 1.0 apps.  Java is fiercely
upward compatible. The problem of course is the other way.  You can't
run 1.5 code on and old 1.4 JVM.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Ian Mills - 04 Feb 2006 11:22 GMT
>>   I believe the 1.5 JVM can run 1.4 applications even without a recompile,
>>so it should be even easier than Dan is suggesting (which was already pretty
[quoted text clipped - 3 lines]
> upward compatible. The problem of course is the other way.  You can't
> run 1.5 code on and old 1.4 JVM.
The only thing to be carefull of is where new keywords have been
introduced. A classic example is where people have used things like
Enumeration enum = ...

This is obviously a problem on 1.5 as enum is now a reserved word.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.