Win32 Environment Variables via JavaWebStart & Native dll
M. Gallant 03/05/2002
The application available here demonstrates how to use native dll with a Java Web Start application. In this
example, JNI is used to provide functionality for reading the win32 environment variables. The steps that
might be followed are:
- Write java application with jni function declaration and a System.loadLibrary(Your dll); statement
- Write the C code implementation of the native function using the javah-provided function signature
- Compile the C code into a dll using your favorite C/C++ compiler
- Test the functionality of the Java application locally, calling the native function in your custom dll
- Archive the calling Java application class(es) and digitally sign this archive
- Archive the custom dll file and digitally sign this archive
- Write the jnlp configuration file to specify the archive containing the .dll file as a nativelib tag
- Design the deployment directory structure, as specified in your Java Web Start jnlp config. file
- Deploy to a web server having the proper mime-type mapping for jnlp file types
- Test to ensure that all jar archives are properly loaded and have signatures that are properly resolved
Typical compiling, archiving and signing commands
typical jnlp using native library