Win32 J/Direct Native Message Box

(requires Win32 and IE4+: Tested on Win95, NT4-sp4, Win2000)
M. Gallant 03/15/2000

This page contains a Java applet which will try to launch a Win32 native message box on a Win32 platform and IE4+ browser displaying the Microsoft JVM version information. The Java code implements J/Direct capability for the Win32 platform. Since this is a privileged operation, the code must be digitally signed. Microsoft provides the Microsoft SDK for Java, Version 4.0 for signing many types of (cab, exe, dll, ocx files) and providing the Java prilivege information (for cab files) so that the Authenticode security mechanism can validate the code. For signing non-cab files, Microsoft provides a small signing kit (cryptoAPI tools for IE5) which is a subset of SDK4

The basic batch file script below shows how the applet code was compiled with jvc, cab'd with cabarc and signed with signcode:

jvc /x- /d . Simple.java
cabarc -p n mycab1.cab simple/Simple.class
del simple\Simple.class
signcode -j javasign.dll -jp LOW -cn "Security Development" -n "Win32 Native MessageBox Demo" -t "http://timestamp.verisign.com/scripts/timstamp.dll"  mycab1.cab
The html that references the signed cab file (for deployment to IE4+ browsers only) is:
<APPLET CODE="simple.Simple" WIDTH=2 HEIGHT=2> <PARAM NAME="cabbase" VALUE="mycab1.cab"> </APPLET>
(n.b. For Win95 platforms, the MessageBox may appear minimized on the taskbar)