 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Thomas Baker Guest
|
Posted: Thu Mar 04, 2004 10:34 pm Post subject: Switching Between SUN and Microsoft JVM Programmatically |
|
|
I've been given an interesting challenge by the IT department.
They have software that uses the SUN JVM in IE on WinXP and won't work
on the MS one and also vice versa. They've supplied me with the steps
to change this in the "Sun Java Plug-in" Control Panel item and I found
the steps to do it in "Internet Options" on the web. But they want it
so it can be done programatically - one click off the desktop I guess.
Do any of the gurus on here have an opinion as to how this might be
done, whether it is undesirable for any reason and any other thoughts on
the matter?
I thought perhaps the only option was to change a registry setting using
the Win32 API or something (can you tell I know very little about
this?!) but then looking at the control panel item it looks too Java-y
to be a Win32 thing so perhaps there is some way to change it from
inside a java program (not an applet, obviously, but a full blown Java
prog).
Any ideas?
Thanks,
Tom
|
|
| Back to top |
|
 |
Alun Harford Guest
|
Posted: Thu Mar 04, 2004 10:42 pm Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically |
|
|
"Thomas Baker" <tempus_rookNOSPAM (AT) hotmail (DOT) com> wrote
| Quote: | I've been given an interesting challenge by the IT department.
They have software that uses the SUN JVM in IE on WinXP and won't work
on the MS one and also vice versa. They've supplied me with the steps
to change this in the "Sun Java Plug-in" Control Panel item and I found
the steps to do it in "Internet Options" on the web. But they want it
so it can be done programatically - one click off the desktop I guess.
Do any of the gurus on here have an opinion as to how this might be
done, whether it is undesirable for any reason and any other thoughts on
the matter?
|
Well I don't know exactly where the information is stored but I would have
thought a simple .reg file should solve it (maybe change the PATH too).
Alun Harford
|
|
| Back to top |
|
 |
Thomas Baker Guest
|
Posted: Thu Mar 04, 2004 11:16 pm Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically |
|
|
| Quote: | They have software that uses the SUN JVM in IE on WinXP and won't work
on the MS one and also vice versa. They've supplied me with the steps
to change this in the "Sun Java Plug-in" Control Panel item and I found
the steps to do it in "Internet Options" on the web. But they want it
so it can be done programatically - one click off the desktop I guess.
Well I don't know exactly where the information is stored but I would have
thought a simple .reg file should solve it (maybe change the PATH too).
|
Yeah, there is in fact a registry key that does the switch --
[HKEY_LOCAL_MACHINESOFTWAREJavaSoftJava Plug-in1.4.2_01]
"UseJava2IExplorer"=dword:00000001
-- but the more I think about this the more I think the IT dept. has
asked for something silly. I mean, I make an app that says, "You have
SUN Java 1.4.2 and MS Java 1.2 which do you want to use?" and the poor
user has to work out what that means and choose one OR they use the Sun
Control Panel extension which has been extensively tested and works just
fine to do exactly the same thing.
Basically both ways the users get confronted with techie nonsense that
they have to do to make the apps work so why not confront them with the
techie nonsense that is much less likely to be buggy and corrupt their
registry?!
Now if I could get the VM to change based on page visited in the browser
or something like that then maybe but I don't think so somehow ...
|
|
| Back to top |
|
 |
Alun Harford Guest
|
Posted: Thu Mar 04, 2004 11:53 pm Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically |
|
|
"Thomas Baker" <tempus_rookNOSPAM (AT) hotmail (DOT) com> wrote
| Quote: | Now if I could get the VM to change based on page visited in the browser
or something like that then maybe but I don't think so somehow ...
|
Hmm... How do you fancy coding a complete browser :-)
|
|
| Back to top |
|
 |
Shane Mingins Guest
|
Posted: Fri Mar 05, 2004 12:46 am Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically |
|
|
"Thomas Baker" <tempus_rookNOSPAM (AT) hotmail (DOT) com> wrote
| Quote: | They have software that uses the SUN JVM in IE on WinXP and won't work
on the MS one and also vice versa.
|
Java code not running on the MS JVM I can understand, but java code not
running on the Sun JVM I would have thought strange. Who developed it?
Is this a common problem, anyone? (that is java not running on the Sun JVM)
As a solution, how about trying the IBM JVM ... maybe both will run on that.
Shane
|
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Fri Mar 05, 2004 1:07 am Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically |
|
|
On Thu, 4 Mar 2004 22:42:52 -0000, Alun Harford wrote:
| Quote: | "Thomas Baker" <tempus_rookNOSPAM (AT) hotmail (DOT) com> wrote in message
news:4047af15$0$254$fa0fcedb (AT) lovejoy (DOT) zen.co.uk...
I've been given an interesting challenge by the IT department.
They have software that uses the SUN JVM in IE on WinXP and won't work
on the MS one and also vice versa. They've supplied me with the steps
to change this in the "Sun Java Plug-in" Control Panel item and I found
the steps to do it in "Internet Options" on the web. But they want it
so it can be done programatically - one click off the desktop I guess.
|
Are these applets? applications in jar files?
applications launched off desk-top?
As someone else mentioned, you should be able
to use a launcher file to set the runtime version
for you applications.
Applets can use HTML converter (better suited to
a precisely controlled environment like intranet)
to specify a particular Java VM. The
JavaVersionApplet can ensure a JVM minimum
version in a %100 Java solution.
| Quote: | Do any of the gurus on here have an opinion as to how this might be
done, whether it is undesirable for any reason and any other thoughts on
the matter?
|
It is more desirable to update the jar
so that they will _all_ run on the latest VM.
--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
|
|
| Back to top |
|
 |
Jon A. Cruz Guest
|
Posted: Fri Mar 05, 2004 4:47 am Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically |
|
|
Thomas Baker wrote:
| Quote: | -- but the more I think about this the more I think the IT dept. has
asked for something silly. I mean, I make an app that says, "You have
SUN Java 1.4.2 and MS Java 1.2 which do you want to use?"
|
But...
There is no MS Java 1.2
There's only 1.1.4, which missed the whole slew of bugfixes in 1.1.5
(not to mention anything else in 1.1.6, 1.1.7 and 1.1. .
|
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Fri Mar 05, 2004 5:08 am Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically |
|
|
On Thu, 04 Mar 2004 20:47:26 -0800, Jon A. Cruz wrote:
| Quote: | Thomas Baker wrote:
-- but the more I think about this the more I think the IT dept. has
asked for something silly. I mean, I make an app that says, "You have
SUN Java 1.4.2 and MS Java 1.2 which do you want to use?"
But...
There is no MS Java 1.2
There's only 1.1.4, which missed the whole slew of bugfixes in 1.1.5
(not to mention anything else in 1.1.6, 1.1.7 and 1.1. .
|
But _they_ in turn missed the slew of
bugs and security holes introduced in
the 3Meg of MS specific classes in
the 1.1.4 MS VM.
(sighs) In every gain, there is a loss. ;-)
--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|