110 likes | 241 Views
Mustang and preview of Dolphin 29 October 2007 – JavaXPG meeting. Presentation Overview. Short History of Java Java 1.6 Mustang Mustang core features JAXB Java Architecture for XML Binding Java 1.7 Dolphin. A brief history of Java. JDK 1.0 (January 23, 1996)
E N D
Mustang and preview of Dolphin 29 October 2007 – JavaXPG meeting
Presentation Overview Short History of Java Java 1.6 Mustang Mustang core features JAXB Java Architecture for XML Binding Java 1.7 Dolphin
A brief history of Java JDK 1.0 (January 23, 1996) JDK 1.1 (February 19, 1997) J2SE 1.2 (December 8, 1998) Playground J2SE 1.3 (May 8, 2000) Kestrel J2SE 1.4 (February 6, 2002) Merlin JSR 59 J2SE 5.0 (September 30, 2004) Tiger JSR 176 Java SE 6 (December 11, 2006) Mustang JSR 270 Java SE 7 (????, 2008) Dolphin In progress
Java 1.5 Tiger – Major Features Generics / (Templates in C++ terms) List<String> nameList = new Vector<String>(); Annotations / Meta-data @XmlType(name = "ORDER_TYPE") Enumerations public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } Varargs System.out.printf(“This is a number %d and a float %f10.6”, anInt, aDouble );
Java 1.5 Mustang – Major Features GUI API's enhancements (Swing, AWT, Desktop, Console) JDBC 4.0 Pluggable annotations Tight Scripting integration Java Complier API JAXB 2.0
Miscellaneous Tips & new Tricks 1 String.isEmpty() Double ended queue: Deque XML Resource bundles HTML Cookies User-Interface enhancements Splash screens Desktop System tray Dialog modality
Miscellaneous Tips & new Tricks 2 URL with space: public class FileURL { public static void main(String args[]) throws MalformedURLException { Console console = System.console(); File file = new File("The End"); URL url1 = file.toURL(); URL url2 = file.toURI().toURL(); console.printf("Bad url %s%n", url1); console.printf("Good url %s%n", url2); } OUTPUT: Bad url file:/C:/Presentation/The End Good url file:/C:/Presentation/The%20End
Java Architecture for XML Binding Description of JAXB at: http://java.sun.com/developer/technicalArticles/WebServices/jaxb/
Live demo in Eclipse Create schema (XSD) Option 1 Compile schema with xjc (= Binding compiler) which yields a ObjectFactory Option 2 Create bean classes Add root tag annotation Add file jaxb.index in package
Java 1.7 Dolphin – Sneak preview Still in the JCP process and an umbrella JSR is not available yet Possible additions Closures