aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/oculusvr/oculusvr-ovr-CustomJavaCode.java
diff options
context:
space:
mode:
Diffstat (limited to 'make/config/oculusvr/oculusvr-ovr-CustomJavaCode.java')
-rw-r--r--make/config/oculusvr/oculusvr-ovr-CustomJavaCode.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/make/config/oculusvr/oculusvr-ovr-CustomJavaCode.java b/make/config/oculusvr/oculusvr-ovr-CustomJavaCode.java
new file mode 100644
index 000000000..06f7b3234
--- /dev/null
+++ b/make/config/oculusvr/oculusvr-ovr-CustomJavaCode.java
@@ -0,0 +1,22 @@
+
+static {
+ AccessController.doPrivileged(new PrivilegedAction<DynamicLibraryBundle>() {
+ public DynamicLibraryBundle run() {
+ final DynamicLibraryBundle bundle = new DynamicLibraryBundle(new OVRDynamicLibraryBundleInfo());
+ if(null==bundle) {
+ throw new RuntimeException("Null DynamicLibraryBundle");
+ }
+ /** No native tool library to load
+ if(!bundle.isToolLibLoaded()) {
+ throw new RuntimeException("Couln't load native OVR library");
+ } */
+ if(!bundle.isLibComplete()) {
+ throw new RuntimeException("Couln't load native OVR/JNI glue library");
+ }
+ if( !initializeImpl() ) {
+ throw new RuntimeException("Initialization failure");
+ }
+ return bundle;
+ } } );
+}
+