Я пытаюсь загрузить файл .dll
в мой java класс OpenDmx.java
с именем opendmx.dll
в каталоге /Users/ethan/Desktop/LightingConsole/opendmx.dll
.
Как видите, я пытался System.loadLibrary()
и System.setProperty()
. Также не изображено Я пытался System.load()
.
Я понятия не имею, что попробовать дальше, и любая помощь будет оценена.
КОД
static {
System.setProperty("java.library.path", "/Users/ethan/Desktop/LightingConsole");
System.loadLibrary("opendmx");
}
ОШИБКА
Exception in thread "main"
java.lang.UnsatisfiedLinkError: no opendmx in java.library.path
[/Users/ethan/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
Затем я попытался:
java -agentpath:"/Users/ethan/Desktop/LightingConsole/opendmx.dll"
, который дал мне ошибку:
Error occurred during initialization of VM
Could not find agent library /Users/ethan/Desktop/LightingConsole/opendmx.dll in absolute path, with error: dlopen(/Users/ethan/Desktop/LightingConsole/opendmx.dll, 1): no suitable image found. Did find:
/Users/ethan/Desktop/LightingConsole/opendmx.dll: unknown file type, first eight bytes: 0x4D 0x5A 0x50 0x00 0x02 0x00 0x00 0x00
/Users/ethan/Desktop/LightingConsole/opendmx.dll: unknown file type, first eight bytes: 0x4D 0x5A 0x50 0x00 0x02 0x00 0x00 0x00