我正在使用Play Framework 2.1 RC2
构建一个使用TFS Java SDK
. TFS APIs
需要包含一组本机 dll(例如native_auth.dll
)。
如何在应用程序运行时使本机库可用?我在哪里可以指定要包含的本机 dll?
更新:我尝试使用static
blockSystem.load("full path")
并加载它
app.classloader().loadClass("NativeUtils.class");
,但仍然出现异常:
java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String;
at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Native Method)
at com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.getEnvironmentVariable(NativePlatformMisc.java:134)
at com.microsoft.tfs.jni.PlatformMiscUtils.getEnvironmentVariable(PlatformMiscUtils.java:52)
at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.shouldAcceptUntrustedCertificates(DefaultHTTPClientFactory.java:288)
at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.configureClientParams(DefaultHTTPClientFactory.java:324)
at com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory.newHTTPClient(DefaultHTTPClientFactory.java:137)
at com.microsoft.tfs.core.TFSConnection.getHTTPClient(TFSConnection.java:1041)
at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:874)
at com.microsoft.tfs.core.config.client.DefaultClientFactory$9.newClient(DefaultClientFactory.java:265)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:90)
at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1470)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getWorkItemClient(TFSTeamProjectCollection.java:370)
提前感谢您的投入!