Creating Win32 Applications with jexegen.exe

M. Gallant 10/15/2001

Java is a great development environment, designed to enable rapid generation of relatively bug-free versatile robust code. For deployment to Win32 platforms, greater performance and end-user convenience can be achieved by compiling your Java bytecode into Win32 executable applications (which however still require the MS-JVM installed for certain Java-specific dlls). The Microsoft utility jexegen.exe, included with the Microsoft SDK 4 for Java converts arbitrary Java bytecode class files, and any resource files (images, sound, text, binary ..) into a self-contained win32 executable .exe file, launchable on any win32 platform with IE4+ installed.

Procedure for Generating Win32 exe using Jexegen.exe

Using a custom icon with the jexegen .exe Java application

A custom desktop icon can be included as a resource with a jexegen-generated application. This can be done in a number of ways:

(1) Use VC++ 6 to edit the .exe file as a resource and add an icon resource.
(2) Generate and compile a custom stub .exe file with the custom icon (SDK4/Java samples).
(3) Use the rc.exe utility (Resource Compiler) provided with the Windows Platform SDK (doesn't require the C++ compiler).

The manual approach using the rc.exe Platform SDK utility is now described:

The custom icon image in the file "flask.ico" is now bound into the .exe Java application.