From d211dfcecba5211b94fdb556ba51cba213a7325e Mon Sep 17 00:00:00 2001 From: pavl_g Date: Thu, 8 Aug 2024 03:20:47 -0400 Subject: [PATCH] Updated to jSnapLoader 1.0.0-stable --- gradle/libs.versions.toml | 2 +- .../java/com/github/stephengold/snapjolt/HelloWorld.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 628a65d..18f13ca 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ jolt-jni-linuxarm64 = { module = "com.github.stephengold:jolt-jni-Linux_ARM64", jolt-jni-macosx64 = { module = "com.github.stephengold:jolt-jni-MacOSX64", version.ref = "jolt-jni" } jolt-jni-macosxarm64 = { module = "com.github.stephengold:jolt-jni-MacOSX_ARM64", version.ref = "jolt-jni" } jolt-jni-windows64 = { module = "com.github.stephengold:jolt-jni-Windows64", version.ref = "jolt-jni" } -jsnaploader = "io.github.electrostat-lab:snaploader:1.0.0-epsilon-1" +jsnaploader = "io.github.electrostat-lab:snaploader:1.0.0-stable" [bundles] diff --git a/src/main/java/com/github/stephengold/snapjolt/HelloWorld.java b/src/main/java/com/github/stephengold/snapjolt/HelloWorld.java index 65b2ad5..f15c82d 100644 --- a/src/main/java/com/github/stephengold/snapjolt/HelloWorld.java +++ b/src/main/java/com/github/stephengold/snapjolt/HelloWorld.java @@ -20,14 +20,16 @@ of this software and associated documentation files (the "Software"), to deal SOFTWARE. */ package com.github.stephengold.snapjolt; + import com.github.stephengold.joltjni.*; import com.github.stephengold.joltjni.enumerate.*; import electrostatic4j.snaploader.LibraryInfo; import electrostatic4j.snaploader.LoadingCriterion; import electrostatic4j.snaploader.NativeBinaryLoader; +import electrostatic4j.snaploader.filesystem.DirectoryPath; import electrostatic4j.snaploader.platform.NativeDynamicLibrary; import electrostatic4j.snaploader.platform.util.PlatformPredicate; -import java.io.IOException; + /** * A straightforward Java translation of the Jolt Physics "hello world" sample * application. @@ -57,7 +59,8 @@ public class HelloWorld { // Program entry point public static void main(String[] argv) { - LibraryInfo info = new LibraryInfo(null, null, "joltjni", null); + LibraryInfo info = new LibraryInfo(new DirectoryPath("linux/x86-64/com/github/stephengold"), + "joltjni", DirectoryPath.USER_DIR); NativeBinaryLoader loader = new NativeBinaryLoader(info); NativeDynamicLibrary[] libraries = new NativeDynamicLibrary[] { new NativeDynamicLibrary("linux/aarch64/com/github/stephengold", PlatformPredicate.LINUX_ARM_64),