Skip to content

stephengold/jolt-jni-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

732 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The jolt-jni-docs project provides documentation and sample applications for the Jolt-JNI physics library.

It contains 12 subprojects:

  1. docs: Antora external documentation for Jolt JNI, including a tutorial
  2. java-apps: all 27 sample applications mentioned in the tutorial, in Java
  3. scala-apps: all 27 sample applications, ported to Scala
  4. jython-apps: 13 sample applications ported to Jython Python
  5. nashorn-apps: 8 sample applications ported to Nashorn JavaScript
  6. kotlin-apps: 7 sample applications ported to Kotlin
  7. jruby-apps: 4 sample applications ported to JRuby Ruby
  8. groovy-apps: 3 sample applications ported to statically-compiled Groovy
  9. groovy223-apps: 3 sample applications ported to scripted Groovy
  10. luaj-apps: a sample application ported to Luaj Lua
  11. luajava-apps: a sample application ported to Luajava Lua
  12. src/clojure: a sample application ported to Clojure

For visualization, many of the sample applications utilize the SPORT graphics engine for Jolt, which is a separate open-source project at GitHub.

Complete source code is provided under a 3-clause BSD license.

How to build and run jolt-jni-docs from source

Sample applications (except Clojure)

  1. Install a Java Development Kit (JDK), version 21 or higher, if you don't already have one.
  2. Point the JAVA_HOME environment variable to your JDK installation: (In other words, set it to the path of a directory/folder containing a "bin" that contains a Java executable. That path might look something like "C:\Program Files\Eclipse Adoptium\jdk-21.0.3.7-hotspot" or "/usr/lib/jvm/java-21-openjdk-amd64/" or "/Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home" .)
  • using Bash or Zsh: export JAVA_HOME=" path to installation "
  • using Fish: set -g JAVA_HOME " path to installation "
  • using Windows Command Prompt: set JAVA_HOME=" path to installation "
  • using PowerShell: $env:JAVA_HOME = ' path to installation '
  1. Download and extract the jolt-jni-docs source code from GitHub:
  • using Git:
    • git clone https://github.com/stephengold/jolt-jni-docs.git
    • cd jolt-jni-docs
  1. Run the Gradle wrapper:
  • using Bash or Fish or PowerShell or Zsh: ./gradlew build
  • using Windows Command Prompt: .\gradlew build

To run the Java version of the "HelloJoltJni" application:

  • using Bash or Fish or PowerShell or Zsh: ./gradlew :java-apps:HelloJoltJni
  • using Windows Command Prompt: .\gradlew :java-apps:HelloJoltJni

Clojure sample applications

  1. Install a Java Development Kit (JDK), if you don't already have one.
  2. Install a Leiningen build tool.
  3. Download and extract the jolt-jni-docs source code from GitHub.
  4. lein run

Antora documentation

  1. Download and extract the jolt-jni-docs source code from GitHub.
  2. Edit "docs/playbook.yml" and replace "/home/sgold/NetBeansProjects/jolt-jni-docs" with an absolute path to your checkout directory (2 places).
  3. Install Node.js
  4. Run the Antora site generator: npx antora docs/playbook.yml

Cleanup

You can restore the project to a pristine state:

  • using Bash or Fish or PowerShell or Zsh: ./gradlew clean
  • using Windows Command Prompt: .\gradlew clean