1

After failing to get JNI stuff working on the Mac, I decided to try on windows. I compiled my DLL, and put it in the java.library.path, just as I did on the Mac.

Now.. Java gives me this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\path\to\dll\TheDll.dll: This operation is only valid in the context of an app container

This operation is only valid in the context of an app container

What? I've tried googling this, but nothing of relevance shows up. Weirdly, it worked on the Mac just fine.

What's the cause of this?

4

1 回答 1

5

Turns out the error message was generated by Windows, and was caused by this bit of wackiness:

I was compiling as a Windows Store DLL rather than a Win32 DLL. Ridiculous, but at least I found the answer.

于 2013-04-04T01:27:52.833 回答