AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Switching Between SUN and Microsoft JVM Programmatically

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Thomas Baker
Guest





PostPosted: Thu Mar 04, 2004 10:34 pm    Post subject: Switching Between SUN and Microsoft JVM Programmatically Reply with 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?

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





PostPosted: Thu Mar 04, 2004 10:42 pm    Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically Reply with quote



"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





PostPosted: Thu Mar 04, 2004 11:16 pm    Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically Reply with quote



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





PostPosted: Thu Mar 04, 2004 11:53 pm    Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically Reply with quote

"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





PostPosted: Fri Mar 05, 2004 12:46 am    Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically Reply with quote

"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





PostPosted: Fri Mar 05, 2004 1:07 am    Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically Reply with quote

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





PostPosted: Fri Mar 05, 2004 4:47 am    Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically Reply with quote

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.Cool.


Back to top
Andrew Thompson
Guest





PostPosted: Fri Mar 05, 2004 5:08 am    Post subject: Re: Switching Between SUN and Microsoft JVM Programmatically Reply with quote

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.Cool.

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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.