??????? ? Java SE 6 PowerPoint PPT Presentation

presentation player overlay
About This Presentation
Transcript and Presenter's Notes

Title: ??????? ? Java SE 6


1
??????? ? Java SE 6
  • Java SE 6 Scripting Support

Mihail Stoynovmihail.stoynov.com
2
Wheres the problem?
  • Java provides rich resources for both desktop and
    web application development
  • Using them from outside is impractical
  • No standard has defined how developers can use
    Java class files from other programming languages

3
Reasons to Use a Scripting Language
  • Dynamically typed (auto type conversions)
  • Perform the script compilation and execution
    within the same process
  • Some do a specific job very well
  • perl for text processing
  • Users can insert functionality in a language they
    know

4
With the scripting platform you can do the
following
  • Access and control Java technology-based objects
    from a scripting environment
  • Create web content with scripting languages
  • Embed scripting environments within Java
    technology-based applications

5
Javax.scripting
  • Open source project
  • scripting.dev.java.net (glassfish)
  • Rhino embedded (mozilla)
  • Implementations napishi koi sa
  • Daj primer s pone oshte edin ezik

6
Demo
  • Embed scripting environments within Java
    technology-based applications

7
Java-to-JavaScript
  • In an applet, communicate with the browsers
    JavaScript engine
  • Use netscape.javascript.JSObject
  • Scriplet (not the JSP term)
  • Go even further with scripting write an applet
    in JavaScript
  • Allow the JavaScript to communicate with the
    browser

8
Demo
  • Scriptlets
  • (Applets written in JavaScript)

9
Questions?
  • Java SE 6 Scripting Support

Mihail Stoynovmihail.stoynov.com
Write a Comment
User Comments (0)
About PowerShow.com