PRB: Getting "Unsatisfied Link Error" When Using J/DirectID: Q180713
|
The following error message is generated when trying to run a Java application or applet that uses J/Direct:
Error: Java.lang.unsatisified link error...
This error can occur if an old version of the Java Language Compiler (JVC)
is used. Make sure you are using Jvc.exe version 4337 or later. Version
4337 is shipped with the Microsoft SDK 2.0 for Java. Since J/Direct
requires the use of compile-time directives like @dll.import (to import
native methods from a DLL) it requires the latest version of Jvc.exe, which
can recognize these compile-time directives.
NOTE: Microsoft virtual machine build 2252 (or higher) is required for
J/Direct.
After you have installed the SDK for Java 2.0 or later, if you are trying to build your Java applet or application that uses J/Direct from within the Developer Studio, then add the SDK-Java\Bin directory to the Visual J++ executable files path as follows:
This behavior is by design.
The following is a check-list that you can use to trouble-shoot this problem if you are still seeing this error after upgrading to the Jvc.exe version 4337 or later.
// This method is exported as ordinal #34.
/** @dll.import("MyDll",entrypoint="#34") */
public static native void MySample();
/** @dll.import("KERNEL32") */
class Test
{
public static native int GetEnvironmentStrings();
public static native int GetEnvironmentVariable(String name,
StringBuffer value,
int ccbValue);
}
For more information about J/Direct, see the following page on the Microsoft Web site:
http://www.microsoft.com/java/sdk/For more information on Updating the Visual J++ 1.x compiler, please see the SDK for Java documentation and the following article in the Microsoft Knowledge Base:
Q177165 INFO: Use New Java 1.1 Language Features with Visual J++ 1.1For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
Additional query words: J/Direct unsatisfiedlinkerror jvc
Keywords : kberrmsg kbSDKJava200 kbSDKJava201 kbSDKJava300 kbVJ100 kbVJ110 kbSDKJava310 kbSDKJava202 JDirectX
Version : WINDOWS:1.0,1.1,2.0,2.01
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 26, 1999