Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rnkhouse/06b1ddd4d5b73502ec503a5b470578f5 to your computer and use it in GitHub Desktop.
Save rnkhouse/06b1ddd4d5b73502ec503a5b470578f5 to your computer and use it in GitHub Desktop.
// step 1 install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo npm install java --save
// step 2 using
var java = require("java");
var jarfile = "jarfileName.jar";
java.classpath.push(jarPath);
java.import('package name');
// Examples proguard retrace.jar load
var jarfile = "retrace.jar"; //Download -> https://sourceforge.net/projects/proguard/
var jarPath = path.join(__dirname, '..', 'proguard', jarfile);
java.classpath.push(jarPath);
var retrace = java.import('proguard.retrace.ReTrace');
// use Examples function
retrace.getRetracedResult("param 1","param 2") // -> [Function: bound callStaticMethod]
retrace.getRetracedResultSync("param 1","param 2") // -> [Function: bound callStaticMethodSync]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment