greenflute 发表于 2006-9-7 10:12

[Link]Scripting for the Java Platform

Sun Developer Network (SDN)


The Java platform provides rich resources for both desktop and web application development. However, using those resources from outside the platform has been impractical unless you resort to proprietary software solutions. No industry standard has defined or clarified how developers can use Java class files from other programming languages. Scripting languages haven't had a standard, industry-supported way to integrate with Java technologies. However, as Bob Dylan once said, "the times, they are a changin'." One change is Java Specification Request (JSR) 223, which helps developers integrate Java technology and scripting languages by defining a standard framework and application programming interface (API) to do the following:

   1. Access and control Java technology-based objects from a scripting environment
   2. Create web content with scripting languages
   3. Embed scripting environments within Java technology-based applications

This article focuses on the specification's third goal and will show you how to use an embedded scripting environment from a Java platform application. A demo application called ScriptCalc will provide a working example of how to extend your applications with user-defined scripts in the JavaScript programming language.

Note: Any API additions or other enhancements to the Java SE platform specification are subject to review and approval by the JSR 270 Expert Group.


http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/
页: [1]
查看完整版本: [Link]Scripting for the Java Platform