⇤ ← Revision 1 as of 2006-09-27 23:47:18
17
Comment:
|
1881
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
''In Progress'' | = Scripting Jython with JDK 6 = ''Submitted By: Josh Juneau'' == Introduction == There are many features within the JDK 6 builds which are going to open new doors for Java programmers. Perhaps one of the most unique new features of JDK 6 is the inclusion of a scripting project which allows usage of countless java scripting languages within Java applcations. Sun's implementation of Java SE6 includes a script engine based upon [http://www.mozilla.org/rhino Rhino: JavaScript for Java]. However, this scripting framework has been implemented in such a way that it also supports third-party engines that implement [http://download.java.net/jdk6/docs/api/javax/script/package-summary.html JSR 223 Scripting APIs]. Of course, the topic for this article is the utilization of Jython within a Java application with the new JDK 6 scripting framework. The jython engine is available for download along with the other scripting language implementations on the [https://scripting.dev.java.net/ scripting.java.net website]. While the Jython scripting engine only supports release 2.1, it's utilization provides seamless integration within Java applications...with a minor effort. == Setting Up The Environment == To begin using the JDK 6 scripting engine, you will need to obtain a copy of JDK6. You can use [http://java.sun.com/javase/downloads/ea.jsp this link] to grab the latest release as of this writing. You'll also need to visit the [https://scripting.dev.java.net/ scripting.java.net website] mentioned previously and obtain a copy of the JSR 223 engines. Once you've installed the JDK and set up the Jython engine, you are ready to begin using the scripting framework. A command line scripting environment is shipped along with JDK 6 and it is useful for testing scripts. However, you can just as easily use the jython interactive command console. |
Scripting Jython with JDK 6
Submitted By: Josh Juneau
Introduction
There are many features within the JDK 6 builds which are going to open new doors for Java programmers. Perhaps one of the most unique new features of JDK 6 is the inclusion of a scripting project which allows usage of countless java scripting languages within Java applcations. Sun's implementation of Java SE6 includes a script engine based upon [http://www.mozilla.org/rhino Rhino: JavaScript for Java]. However, this scripting framework has been implemented in such a way that it also supports third-party engines that implement [http://download.java.net/jdk6/docs/api/javax/script/package-summary.html JSR 223 Scripting APIs].
Of course, the topic for this article is the utilization of Jython within a Java application with the new JDK 6 scripting framework. The jython engine is available for download along with the other scripting language implementations on the [https://scripting.dev.java.net/ scripting.java.net website]. While the Jython scripting engine only supports release 2.1, it's utilization provides seamless integration within Java applications...with a minor effort.
Setting Up The Environment
To begin using the JDK 6 scripting engine, you will need to obtain a copy of JDK6. You can use [http://java.sun.com/javase/downloads/ea.jsp this link] to grab the latest release as of this writing. You'll also need to visit the [https://scripting.dev.java.net/ scripting.java.net website] mentioned previously and obtain a copy of the JSR 223 engines.
Once you've installed the JDK and set up the Jython engine, you are ready to begin using the scripting framework. A command line scripting environment is shipped along with JDK 6 and it is useful for testing scripts. However, you can just as easily use the jython interactive command console.