Skip to content Skip to sidebar Skip to footer

Java: Scripting Language (macro) To Embed Into A Java Desktop Application

I am writing a graphics application in Java. Eventually I would like to build in a scripting language so things are programmable. Which language library do you recommend? Likely su

Solution 1:

if the target audience is "no programming skills...." choose jython (python) it is easy to learn. (my 7 year old daugther learned it very quick)

Bruce Eckel made a chapter with jython in "thinking in java".

at the danger getting a "down-vote" python is easier as BASIC :-)

Solution 2:

Lua is appreciated, among other things, by the simplicity of the language, making it easy to learn. LuaJava uses the original Lua implementation, making it complete, but as you point it, maybe delicate to install. I know at least a pure Java implementation of Lua: Kahlua. It is not complete (lacking coroutine support among other things, but one can do much without them) but perhaps already usable for your goal. Unlike, say, Groovy, it shouldn't add much overhead to your application...

Solution 3:

If you wanted to go all out you could utilize scripting for the Java Platform as defined by JSR 223. Taking that approach would allow the application to utilize any language that has a conforming script engine.

Solution 4:

There's also BeanShell, which has the advantage of being a fully-approved JSR, and so perhaps more likely to stick around.

http://www.beanshell.org/

Solution 5:

Java 6 already has javascript available as a JSR 223 scripting language, out of the box.

Post a Comment for "Java: Scripting Language (macro) To Embed Into A Java Desktop Application"