JVM Manager JVM Manager
home Student Projects no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. It does not describe an actual complete program. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; I have too many other projects of my own.

I do contract work for a living, which could include writing a program such as this. However, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project any way you please.

The three versions of the Java Plug-In interfere with each other. In theory you can have only one of them installed at a time. However, you need all three for testing. The simplest version of program would effectively hide two out of the three at any one time, by fiddling with registry entries.

Other JVMs interfere with each other since they may each set the classpath or path a different way. In a similar way, you want to hide all but one of them so they cannot interfere with each other.

For more of a challenge, allow each App to provide a properties file that lists the JVMs it prefers to run under, and the class files it needs pre-installed and the URLs where you can get them if necessary. Your job is to set up its preferred environment, and hide the others. Unfortunately, this limits you to running one JVM at a time. See installing Java for more details.

One extra wrinkle is to check on the web for the latest properties file, so that you know if you must update the App itself as well as any auxiliary files.

You need to install various versions of the Plug-in, ensure they work, and study the registry to see what changes the installer makes. Norton Utilities for Windows used to include a utility for noticing registry changes. I’m not sure if they still ship it. You could also detect registry changes by regedit-exporting the registry to text format and using a standard diff utility.

Your program has to effect these same changes. Java can’t twiddle the registry directly. You must use a native class written in C or C++ that uses the Windows registry fiddling API calls. InstallShield for Java has facilities to fiddle the registry. That would be a way to kludge it.

Look at these entries in the registry:

My computer\HKEY_CURRENT_USER\Software\JavaSoft\Java Plug-In
My computer\HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Development Kit
My computer\HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment
My computer\HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Plug-In
The other thing this utility would do is back up the registry and restore it or recreate it from first principles if it ever becomes damaged, a frequent event.

You also want to switch environment variables such as CLASSPATH and JIKESPATH.

For a rough and ready manager you could use regedit that has the ability export and import parts of the registry. You take snapshots, and just switch between snapshots.

environment
registry
reinstaller: student project
sanity checker

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.16] The information on this page is for non-military use only.
You are visitor number 5,256. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/project/jvmmanager.html J:\mindprod\project\jvmmanager.html