38leinaD / JRift

Java Wrapper for the Oculus Rift HMD and Sensors
MIT License
42 stars 22 forks source link

Simple example failing #10

Open elect86 opened 10 years ago

elect86 commented 10 years ago

So, I am trying to run a simple example

public class Test {

public static void main(String args[]) {

    OculusRift oculusRift = new OculusRift();        
    oculusRift.init();

    HMDInfo hdmInfo = oculusRift.getHMDInfo();
    System.out.println(hdmInfo);

    oculusRift.destroy();
}

}

But I get this error

Exception in thread "main" java.lang.UnsatisfiedLinkError: de.fruitfly.ovr.OculusRift.initSubsystem()Z at de.fruitfly.ovr.OculusRift.initSubsystem(Native Method) at de.fruitfly.ovr.OculusRift.init(OculusRift.java:82) at ec.test.test3.Test.main(Test.java:21) Java Result: 1

I created and included a Library based on:

JRift-0.2.5.1.jar
JRiftLibrary-0.2.5.1.jar
JRiftLibrary-0.2.5.1-natives-windows.jar

What is missing?

elect86 commented 10 years ago

Forced by extracting JRiftLibrary64.dll and adding it to the java path

System.loadLibrary("JRiftLibrary64");

It works.. wtf?