Sun Java Solaris Communities My SDN Account Join SDN
 
Documentation

Java 2 Runtime Environment Notes for Win32

 

The Java 2 Runtime Environment
on Microsoft Windows Platforms

        
Japanese
These notes contain information for developers who are deploying the Java 2 Runtime Environment on Microsoft Windows platforms. For general platform-independent information about the Java 2 Runtime Environment, see Java 2 Runtime Environmnet Notes for Developers.

Installation of Application Launchers

The Java 2 Runtime Environmnet for Win32 platforms is bundled with its own installer program. By default, the installer places a copy of the runtime environment in the C:\Program Files\JavaSoft\JRE\1.3 directory. In addition, the installer puts copies of the java and javaw application-launcher executables at the following locations:
C:\winnt\system32 on Windows NT and Windows 2000 systems
C:\windows\system on Windows 95 and Windows 98 systems
These directories are on the default system path of the operating systems, so users of your software won't need to modify any paths in order for the launchers to be available for your application. You need only provide users with a command line of the form
javaw -classpath <path to classes or jar file> <main class>
or
javaw -jar <jar file>

Registry Settings

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
CurrentVersion1.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:

NameDefault 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"

Native Language Support

If native code support is required on Win32 platforms, the native library must be located in the executable search PATH.

Icons for Jar-Packaged Applications

You can give your application's Jar file a customized icon. The easiest way to do so is to create a Windows shortcut for your application and set its icon to be your custom icon. This can be done by your application's installer program. You can create a custom icon using any icon editor. An icon editor is contained in many commercial development environment such as Visual C++.