Tuesday, 12 December 2006

Java 6 is out

From java.sun.com


  • JavaScript integrated and included with the platform
  • Scripting languages framework extends support for Ruby, Python, and other languages
  • Complete light-weight platform for web services, right out of the box
  • Simplified GUI design and expanded native platform support
  • Full JDBC4 implementation providing improved XML support for Databases
  • Java DB included with the JDK, a free to use and deploy Java Database
  • Full support by NetBeans IDE 5.5

Apart from the NetBeans support ,which I care very litte about anyway (Eclipse all the way!), the scripting integration is a really exciting feature. This also shows that Sun is "worried" about being overtaken by these languages so it wants to bring them in the "fold" quickly and provide incentives to programmers already using Java, to stick with it.



ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine jsEngine = mgr.getEngineByName("JavaScript");
try {
jsEngine.eval("print('Hello, world!')");
}
catch (ScriptException ex) {
ex.printStackTrace();
}


As simple as that. The nice bit is that you can provide core operations using Java and let your users expand on them using javascript or some other scripting language.