BeanShell JSR-223 script engine

Pat Niemeyer has checked in JSR-223 script engine for BeanShell into the http://scripting.dev.java.net project. I've re-generated the binaries to include BeanShell engine. [Note: BeanShell is being standardized by JSR 274]. Daniel Fuchs wrote about using jconsole (monitoring and management console and not the 'jconsole' that comes with BeanShell!) with BeanShell. Now, that there is a jsr-223 script engine for BeanShell, it is possible to use BeanShell with jconsole script shell plugin.
Comments:

This is great!!! I assume this is the standard beanshell, ie the one that doesn't support java 5 syntax yet? I'm still trying to get my head around this java scripting thing, please correct me if i'm wrong - if i wanted do java scripting with java6, and use at least java5 syntax, i'd need to use the java pluging, which actually compiles it, which needs the full jdk so javac is avail? Is that basically correct?

Posted by bob on September 20, 2006 at 12:37 PM IST #

Yes, this is standard BeanShell wrapped with JSR-223 API - so it does not support Java5 syntax (yet). But, there is a JSR-223 script engine for Java - but that requires tools.jar (javac classes are in it) and JDK 6 - because that engine uses javac compiler API (JSR 199). With that script engine, standard Java syntax can be used through JSR-223 API - you can essentially "eval" Java code. BTW, most folks would like a scripting language to be dynamically typed (with "scripty" features such string/regex handling built-in support etc.) language. One that offers better support for accessing JDK classes - so that you can still use the platform API through the scripting language. There are many choices towards this - including but not limited to JavaScript, BeanShell, Groovy, JRuby, Jython, Pnuts, JudoScript, Scheme (SISC) etc.

Posted by A. Sundararajan on September 20, 2006 at 01:24 PM IST #

Right - thanks for the response!! This all makes sense. For my purposes it's only reasonable to use the bare jre so using using the jdk is not really an option. And now that you mention it, the only reason we'd be using java5 syntax is for generic types and probably don't need to use those in a looslely types script. Might try using javascript or one of your other suggestions at some point too... Thanks again.

Posted by bob on September 20, 2006 at 03:56 PM IST #

Post a Comment:
Comments are closed for this entry.
About

sundararajan

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Links

No bookmarks in folder

Blogroll

No bookmarks in folder

News

No bookmarks in folder