I'm using JET to create a .DLL from Java code and am having troubles deploying my application. The general idea is to package Java code in a .DLL, then access that code from C++ using JNI. The project works fine on my development machine, but for some reason, it malfunctions when I distribute it.
I'm using JET to create the .DLL, and JetPack to create the installer. My code requires no Swing or AWT, so I'm using the "JRE-less" setting in JetPack. JetPack completes successfully and produces the installer as expected. I can then copy the installer to a test machine and run it. However, when I exectue my C++ program on the test machine, I consistently get a java.lang.NullPointerException thrown by the .DLL. The exception is thrown everytime I execute the code, and always in the same place.
Though I can't debug the .DLL directly, I've been able to zero in on the call that results in the exception. From what I can tell, the .DLL seems to execute just fine until attempts to create a new GregorianCalendar. The .DLL executes the line of code just prior to the call to the GregorainCalendar(int, int, int, int, int) constructor and does not execute any subsequent lines.
As a temporary workaround, I've instructed JetPack to use the "Internal JRE". For whatever reason, the exception is not thrown by the .DLL when the Sun JRE is present on the test machine. Also, I attempted to use JetPerfect on the .DLL before placing it in JetPack, but the results were the same.
Oh yeah, I'm running JET 3.5 with Sun's JRE 1.4.2_03 on a Win2K machine with MS VC++ 6.0.
I'd appreciate any tips or pointers y'all may have.