jssembly icon indicating copy to clipboard operation
jssembly copied to clipboard

Compile/Run

Open evandrix opened this issue 7 years ago • 0 comments

  • 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 x64 is implemented via ANTLR, although unit test in Main.java fail catastrophically, producing core dump
  • raw is 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

evandrix avatar Nov 25 '18 19:11 evandrix