Oculus Rift, simple example in java failing

I wrote this simple code:

public class Test {

    public static void main(String args[]) {

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

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

//        while(oculusRift.isInitialized()){
//            
//        }

        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

From here

What is missing?

Edit:

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

System.loadLibrary("JRiftLibrary64");

It works.. why does not work on the other way?

Answers


Have you tried JOVR? https://github.com/jherico/jovr

Here a complete example: https://github.com/jherico/jocular-examples

This library is simple, very solid and compatible with the current Oculus Runtime 1.8

Regards


Need Your Help

How can I access a postgresql database from matlab with without matlabs database toolbox?

postgresql matlab interface

I tried already to use pgmex. Unfortunately it doesn't work with libpq5 (matlab immediately crashes).

fragment handling screen orientation with tabs in actionbar

android tabs fragment android-actionbar screen-orientation

Can someone explain to me or maybe point a link or an example of how one should handle screen orientation when it comes to fragments. The problem that I am having at the moment is that I have an ap...