Sundararajan's Weblog

  • Java
    February 26, 2007

Sun Tech Days Hyderabad 2007 - trip report and slides

Guest Author

As I mentioned earlier, I spoke at Sun Tech Days 2007. About 10000 folks attended Sun Tech Days. Approximately about 2000 folks attended each talk (at least in the ones in the "main" room where key notes talks were given). Very nice to see so many developers at one place! I think over the years, Sun Tech Days is growing to become like JavaOne. Kannan and I traveled from Chennai to Hyderabad to attend this event.

This year I gave two talks. In the talk titled "Java SE Language Features - JDK 5.0, 6 and Future", I covered mostly the language features of JDK 5.0. Because there are no Java language features in JDK 6, I covered javac's APIs (JSR 199, JSR 269 and Tree API). For JDK 7, I gave few web references (on closures etc.). The scripting talk is the one we (Mike Grogan and I) gave many times :-) Good news - we won't be talking on scripting in JavaOne 2007 :-).


I didn't have time for Q&A after the scripting talk. We [Charles Nutter and I] answered few scripting questions outside the lecture hall. Summary of the Q & A:

What are the typical use cases of Scripting API?

JSR-223 is applicable where "Java code calls scripts". Say, you have a big Java application. You want to support customization of it. Instead of inventing an ad-hoc, home-grown (and possibly expression-only!) language for that purpose, you can use any JSR-223 scripting language. Your user will have the choice of scripting language. Examples: Scripting SVG with JSR-223. Another example: The Phobos project uses scripting API to support any jsr-223 language in it's web application framework. Yet another example: jconsole script shell plug-in.

Should I've to learn more languages in addition to Java?

It depends on your project! Most projects already involve more than one language (Java, XML, SQL dialect(s?), XPath/XQuery/XSLT ....) anyway. If your project requires, you may add scripting to the mix!

I just prefer to use another language on the Java platform. Do I still have to use JSR-223?

No. JSR-223 is meant for the use cases where you want to call/eval script from your Java code. If you just want to code in another language and still want to use Java platform (for portability, platform API or for any other reason], you can do so without getting into the JSR-223 API. For example, you can use JRuby or Groovy or any other language that runs on the Java platform.

How does the invokedynamic (JSR 292) relate to JSR-223?

A scripting or dynamically typed language may be implemented in many ways: interpreting the abstract syntax tree directly, interpreting it's own bytecode [like JavaScript] or generating JVM bytecodes. If a language is implemented by generating (JVM) bytecode (like Groovy, Pnuts ...), invokedynamic would help there. Whether or not the language runtime implements JSR-223 interface is another (unrelated) matter.


The slides are usually posted at Sun Tech Days site few days after the event. But if you are impatient, you can download the slides for the talks that I gave :-)

Join the discussion

Comments ( 1 )
  • Vaibhav Thursday, March 1, 2007
    Thanks a lot Sundar for putting the slides. I guess now i can do some copy paste work :)
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.