Last active
August 25, 2022 21:01
-
-
Save pegasuskim/0e47dff74cc1c5c943cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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