Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to jSnapLoader 1.0.0-stable #3

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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