The installation program for the Microsoft Windows version
of the Java 2 Runtime Environment uses the
registry to record path and version information. The
application launchers in the C:\windows\system
directory (Windows 95/98) or C:\winnt\system32
(Windows NT and Windows 2000) use the registry settings to obtain the
location of the Java Runtime Environment they are to
use when launching an application.
You can consider using the registry settings in the deployment
of your applications in the following ways:
- If your application has an installation program, you can
have that program check the registry to
determine which version, if any, of the runtime environment already exists
on the platform on which your software is being installed. If an
appropriate version of the JRE is not already
installed, you can prompt the user to download and install the
Java 2 Runtime Environment, or your installation program can install a
copy of the Java 2 Runtime Environment that you redistribute with your application.
- If you choose to use your own custom application launcher
rather than the application launchers that come with the Java 2 Runtime Environment,
you can nevertheless have your launcher check the runtime environment's registry
settings for the location and version of the runtime environment
on the local machine.
When installed, the Java 2 Runtime Environment creates the following registry key:
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment
This key contains the following string value which is set to the
major.minor version of the installed Java 2 Runtime Environment:
| Name | Default Value
|
| CurrentVersion | 1.3 |
In addition, identical registry subkeys are created using the both
the major and minor
version number of the installed Runtime Environment. For example,
the first release of the 1.3 Runtime Environment creates these two keys:
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.3
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.3.1
Each of these keys contain the following string values which contain settings
information for use by the runtime environment:
| Name | Default Value
|
JavaHome
| C:\Program Files\JavaSoft\JRE\1.3.1
|
| RuntimeLib
| C:\Program Files\JavaSoft\JRE\1.3.1\bin\hotspot\jvm.dll
|
| MicroVersion
| 1
| |
JavaHome is set to the full path name of the directory in which
the Java 2 Runtime Environment was installed. RuntimeLib contains the full
path name of the Java runtime DLL to use. MicroVersion identifies the
micro-version of the Java 2 Runtime Environment. For the Java 2 Runtime Environment,
v1.3, the value will be 0, for v1.3.1 it would be 1, etc.
In addition, the following key are created for the
Java Plug-in product:
HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Plugin\1.3.1
This key contains the value
JavaHome="C:\Program Files\JavaSoft\JRE\1.3.1"