FIX: MSJAVAH Fatal Error: java.lang.UnsatisfiedLinkError (222581)
The information in this article applies to:
- Microsoft SDK for Java 3.1
- Microsoft virtual machine
This article was previously published under Q222581 SYMPTOMS
When running MSJAVAH on a compiled Java class, the following error appears:
Fatal error: java.lang.UnsatisfiedLinkError: no myDLL in shared library path
CAUSE
In the 29xx series of the Microsoft virtual machine (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.
RESOLUTION
You can use one of the following to resolve this problem:
- Use SDK for Java Version 3.2 or later. You can download this from http://www.microsoft.com/mscorp/java.
This includes a version of MSJAVAH that doesn't ignore the -NOCLINIT command line switch. The -NOCLINIT option tells MSJAVAH not to run static initializers.
- Comment out the System.loadLibrary( ) line before running MSJAVAH.
- Use a PC with the earlier 29xx series Microsoft VM to generate your headers.
- If you created the DLL before upgrading to SDK For Java 3.1, do not delete the DLL. If MSJAVAH can find it, it won't complain.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem was corrected in Microsoft SDK for Java version 3.2 for Windows.
Modification Type: | Minor | Last Reviewed: | 11/14/2005 |
---|
Keywords: | kbbug kbfix kbJNative KB222581 |
---|
|