Interactive JavaScript console

I found an interesting tutorial which explains how to set up an interactive JavaScript console using Rhino.

Jivedude pointed out that there's a problem with it: putting jar files in lib/ext is a bad idea, since every single Java app will then embed these libraries, even if they don't need them.
In addition to the obvious bloat problem, this can also cause version and incompatibility issues. His suggestion: use java -cp (classpath).

Assuming I put the jar files in /home/erik/lib/, the command then becomes:
java -cp '/home/erik/lib/*' org.mozilla.javascript.tools.shell.Main"
Configuration 0 comments
You must be logged in as a member to add comment to this blog