Last active
May 28, 2018 19:48
-
-
Save Oifan/22df3556ea46a41f771987b93942ca34 to your computer and use it in GitHub Desktop.
[Rhino-X-Java - hiddenField] Accessing Java members from Rhino JS Engine
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
#!/bin/sh | |
URL=https://gist.github.com/Oifan/22df3556ea46a41f771987b93942ca34/raw/43a252ce8bce19991d59636dc562ea3f2c6e770f | |
mkdir lib | |
mkdir src | |
wget "$URL/hidden.sh" | |
wget -O src/mk.sh "$URL/src%2523mk.sh" | |
wget -O src/HiddenField.java "$URL/src%2523HiddenField.java" | |
wget -O src/hiddenField.js "$URL/src%2523hiddenField.js" | |
chmod 755 hidden.sh src/mk.sh | |
echo '[i] Download COMPLETE :-)' | |
echo ' * To COMPILE this example --> Run src/mk.sh' | |
echo ' * To RUN this (after COMPILE) --> Run hidden.sh' |
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
#!/bin/sh | |
javac HiddenField.java | |
jar cvf ../lib/hidden.jar *.class *.java | |
[ -d classes ] || mkdir classes | |
mv *.class classes/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To download & run this example, do following:
To summarize it in 3 lines:
wget https://gist.github.com/Oifan/22df3556ea46a41f771987b93942ca34/raw/8717635de51412f15139c0dfbdb8b61cb2cbe9dd/_init.sh && . _init.sh
cd src && ./mk.sh
cd .. && ./hidden.sh