Groovy has a benefit of being _more_ powerful than java in expresiveness (mainly thanks to closures support). Unfortunately it is only compiled statically or dynamically, with no option for interpreting - so if you plan _very_ frequent reloads of same scripts, you will need to work around that.

Everytime scripting comes up someone says this but I've yet to see an example of how to do it. Guess I don't have enough imagination or something....

There are lots of 'jvm languages' (google) JLua, Jython, Javascript (rhino). I've used rhino and i liked it. I haven't done a project with extensive scripting yet so I don't know how it would perform. Most people here say good things about beanshell.

OK, speaking as an ignorant person here, I'm struggling to find ways that Dynamic Java is anything but an inferior version of beanshell. What am I missing? (I've been through the docs and the website etc - noticed a few minor differences e.g. use of multiple package statements in one source...although, TBH, those sound like mucking about rather than a useful feature???)

OK, speaking as an ignorant person here, I'm struggling to find ways that Dynamic Java is anything but an inferior version of beanshell. What am I missing?

There is a big difference between DJ and beanshell 1.x - in DJ you are able to define new classes, while in beanshell you are just able to implement interfaces using Proxy. AFAIK, in beanshell 2 you have full support for compilation, including defining new classes - so it is a superset of DJ (but DJ is not longer actively developed, is it ?).

Anyway, DJ allowed you to define classes few years before beanshell - and this was a reason for it to exist Currently, it can probably die silently, forgotten in depths of internet.

For me, there are two scripting choices: Beanshell if you want something small and easy, and Groovy, if you want something with all kinds of expresiveness possible to scripting.

Groovy has a benefit of being _more_ powerful than java in expresiveness (mainly thanks to closures support). Unfortunately it is only compiled statically or dynamically, with no option for interpreting - so if you plan _very_ frequent reloads of same scripts, you will need to work around that.

BTW, AFAIK Beanshell 2.0 has support for compilation of scripts.

It said that on the site but he provided absolutely no documentation for that. I also asked on this site a few weeks ago and nobody answered. Could you point in the right direction for this?

I too asked this a while back a s friend wanted me to build him a mud that he could then as joe immortal, go in and type out scripting and add functionality to the mud, not just content. I will have to review the link above in detail.

...although BSH has been at v2 since 2003. Pat (the author) seems to be of the old school of diligence - something that works almost perfectly is marked "beta" until it's had a year to settle down .

e.g. we've been using bsh-2 beta in production environments almost since it came out - no errors. There are some significant bugs, but the kind of thing you'd often see in a gold release of normal software (and thankfully not affecting anything we'd been doing with bsh to date...)

Quote

Anyway, DJ allowed you to define classes few years before beanshell - and this was a reason for it to exist Currently, it can probably die silently, forgotten in depths of internet.

For me, there are two scripting choices: Beanshell if you want something small and easy, and Groovy, if you want something with all kinds of expresiveness possible to scripting.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org