The information in this article applies to:
When running MSJAVAH on a compiled Java class, the following error appears:
Fatal error: java.lang.UnsatisfiedLinkError: no myDLL in shared library path
In the 29xx series of the Microsoft VM, MSJAVAH never wants to initialize the specified class. In the 31xx series, it always wants to initialize the specified class if the class contains primitive members that are declared static and final. Under these conditions, the static block containing the System.loadLibrary method is executed and the aforementioned error occurs.
You can use one of the following to resolve this problem:
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
This problem was corrected in Microsoft SDK for Java version 3.2 for Windows.
To reproduce this error, make sure that you are using SDK for Java 3.1 and compile the following source. Then run MSJAVAH on the resulting class file.
public class TestMSJAVAH { public native void myNativeMethod(); // this is the culprit: public static final double A=3.1; // these work fine: public static double B=3.2; public final double C=3.3; // and this is OK, too: public static final Double D=new Double(3.4); static { System.loadLibrary("myDLL"); } public static void main(String args[]){ new TestMSJAVAH().myNativeMethod(); } }
RNI