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

Compile/Run #6

Open
evandrix opened this issue Nov 25, 2018 · 0 comments
Open

Compile/Run #6

evandrix opened this issue Nov 25, 2018 · 0 comments

Comments

@evandrix
Copy link

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant