Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
RunScript.java - Run JavaScript as Command Option
How to use RunScript.java example to run JavaScript code as a command option? I have Rhino 1.7R5 installed.
✍: FYIcenter
If you want to use RunScript.java example to run JavaScript code as a command option,
you can follow this tutorial:
1. Compile the RunScript.java example:
>cd \fyicenter\rhino1_7R5\examples \fyicenter\rhino1_7R5\examples>\fyicenter\jdk-1.8.0\bin\javac -cp ..\js.jar RunScript.java
2. Run it with with JavaScript code specified in the command line:
\fyicenter\rhino1_7R5\examples>\fyicenter\jdk-1.8.0\bin\java
-cp .\;..\js.jar RunScript "Math.PI;"
3.141592653589793
\fyicenter\rhino1_7R5\examples>\fyicenter\jdk-1.8.0\bin\java
-cp .\;..\js.jar RunScript
"java.lang.System.out.println('Hello World!');"
Hello World!
undefined
⇒ Control.java - Rhino JavaScript Engine Example
⇐ Running Examples Provided in Rhino
2017-08-03, ∼2471🔥, 0💬
Popular Posts:
maven-core-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Core module. Apache Maven is a software ...
JDK 17 jdk.internal.vm.ci.jmod is the JMOD file for JDK 17 Internal VM CI module. JDK 17 Internal VM...
maven-settings-builder-3 .8.6.jaris the JAR file for Apache Maven 3.8.6 Settings Builder module. Apa...
JDK 11 jdk.jshell.jmod is the JMOD file for JDK 11 JShell tool, which can be invoked by the "jshell"...
JDK 11 jdk.dynalink.jmod is the JMOD file for JDK 11 Dynamic Linking module. JDK 11 Dynamic Linking ...