coursier-jni-utils is a small library allowing to tap into various Windows native APIs from Java / Scala via JNI.
coursier-jni-utils is built with
Mill. It comes up with Mill launchers
(mill, mill.bat), so that only a JVM and the Visual C++ compiler
should be needed to build it.
A JVM, such as AdoptOpenJDK 8 or 11, is required.
To check if such a JVM is installed, run
java -version, and check that it prints a version
higher than or equal to 8.
A Visual Studio installation with Visual C++ is required.
IntelliJ IDEA is the recommended IDE to develop on jni-utils. Prior to opening the project with IDEA, run
$ ./mill mill.scalalib.GenIdea/idea
Then open the jni-utils directory in IDEA.
$ ./mill __.compile
This should automatically compile .h / .c files with Visual C++, create a
corresponding .dll, and make it available as a resource from Java.
Some simple tests can be run with
$ ./mill __.test