Skip to content

Commit

Permalink
Merge pull request #3 from Electrostat-Lab/jsnaploader-1.0.0-stable
Browse files Browse the repository at this point in the history
Updated to jSnapLoader 1.0.0-stable
  • Loading branch information
stephengold authored Aug 8, 2024
2 parents 330ab9c + d211dfc commit d583d93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/github/stephengold/snapjolt/HelloWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit d583d93

Please sign in to comment.