Last active
August 29, 2015 14:15
-
-
Save sundararajana/4ab4aade5d7d5086e292 to your computer and use it in GitHub Desktop.
Running #nashorn on Raspberry Pi with #java SE embedded 1.8.0_33
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
I wanted to try Java SE embedded nashorn on Raspberry PI. So, | |
1) I downloaded Oracle Java SE Embedded version 8 update 33 | |
ejdk-8u33-fcs-linux-armv6-vfp-hflt.tar.gz from | |
http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/javase-embedded-downloads-2209751.html | |
2) Followed the steps documented @ "Introducing the EJDK" | |
[ https://blogs.oracle.com/jtc/entry/introducing_the_ejdk ] to create compact1-client JRE. | |
3) I used the following command to make a JRE | |
./ejdk1.8.0_33/bin/jrecreate.sh --profile compact1 --dest compact1-client -vm client -x nashorn | |
The -x nashorn part is to include nashorn.jar in the JRE created | |
4) Created tar.gz out of compact1-client directory created and copied it to Raspberry PI. | |
5) After expanding compact1-client.tar.gz, I created a shell script "jjs" | |
under ./compact1-client/bin | |
`dirname $0`/bin/java jdk.nashorn.tools.Shell $* | |
6) with that, I was able to run jjs as | |
cd ./compact1-client/bin | |
./jjs | |
jjs> print("hello") | |
hello | |
Start up is slow (like many other things in Raspberry Pi!). Once jjs starts in interactive mode, | |
command execution is not bad. Perhaps, I should get a Raspberry Pi 2 ;-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment