----- Original Message -----
From: "Jon Eaves" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 2:24 AM
Subject: Multiple JDK's on Windows [ marginally off-topic ]


> I've got a requirement for having JDK1.1, JDK1.2, JDK1.3 (and
> soon JDK1.4) installed to create releases specific for the
> particular platforms.

I'm running (sometimes, mostly only using JDK 1.3.1):
- IBM JDK 1.3
- Sun JDK 1.1.8
- Sun JDK 1.2.2
- Sun JDK 1.3.1
- Sun JDK 1.4b1

> So, this should be fairly simple, but JavaSoft caught the
> Microsoft disease at JDK1.2 and started to integrate all this
> stuff into the registry.  So, installing JDK1.2 after JDK1.3
> causes all sorts of badness, regardless of PATH or CLASSPATH
> settings.

The only "thing" that seems to use these entries in the registry is the
java[w].exe that get's installed in C:\WinNT\System32 by the setup. And it
really makes sense for these programs, since they won't know the path where
the runtime-libs are locates otherwise. -> It's a acceptable solution for
end-users, since they don't need to care about Path-Settings.

> Anybody out there actually done this under Windows ?  If so,
> want to drop me a line.

Normally I don't set the Path, but I call the java.exe I wish to use using
the absoulute path (i.e. C:\jdk131\bin\java ...).

> I know this is slightly off-topic, but as I'm using Ant for
> all of the building, I'm sure this is a topic of interest to
> more than just me.

For Ant I don't need to do anything besides setting JAVA_HOME correctly.
Ant.bat cares for the rest.

If you use such a setup regularly and don't like to enter absoulte path's,
you may want to copy ant.bat -> java.bat (or some better name that won't
clash with the java.exe installed in system32), pass JDK-Version as the
first arg and set-up your environment in this batch.

'java 13 MyProg' would execute your program with JDK 1.3.x, and so on. You
could also emulate classpath-parameters which are different for these JDK's
and pass them on in the correct way.

But prepare for problems if you try to set this up for a mixed environment
with WinNT/Win9X - look for the postings regarding ant.bat on this list :-(

Nico




Reply via email to