jssembly
jssembly copied to clipboard
Compile/Run
- dependent thirdparty lib Antlr v3.5.2 runtime .jar necessary to compile
- delete:
jni/src/com_polyfx_jssembly_Jssembly_Function.h - in
core/src/com/polyfx/jssembly/Jssembly.java,static { System.loadLibrary("Jssembly"); }is cross-platform - only
x64is implemented via ANTLR, although unit test inMain.javafail catastrophically, producing core dump rawis fine, even works for shellcode 👍
compile
find -name "*.java" -type f >src.txt
mkdir -p bin
javac -cp ".:lib/*" -d bin @src.txt
rm -f src.txt
javah -cp bin -jni -d ../jni/src com.polyfx.jssembly.Jssembly
gcc-8 -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/darwin/" -o bin/libjssembly.jnilib -shared src/Jssembly.c
javac -cp ".:core/bin:core/lib/*" Main.java
run: java -cp ".:core/bin:core/lib/*" -Djava.library.path=jni/bin Main