SlideShare a Scribd company logo
1 of 39
Download to read offline
What The Future Holds For
Java: JDK7 and JavaFX
Simon Ritter
Technology Evangelist
Disclaimer



 The information in this presentation
 concerns forward-looking statements
 based on current expectations and beliefs
 about future events that are inherently
 susceptible to uncertainty and changes in
 circumstance etc. etc. etc.

                                             2
JDK 7 Features
> Language
 • Annotations on Java types
 • Small language changes (Project Coin)
 • Modularity (JSR-294)
> Core
 •   Modularisation (Project Jigsaw)
 •   Concurrency and collections updates
 •   More new IO APIs (NIO.2)
 •   Additional network protocol support
 •   Eliptic curve cryptography
 •   Unicode 5.1

                                           3
JDK 7 Features
> VM
 • Compressed 64-bit pointers
 • Garbage-First GC
 • Support for dynamic languages (Da Vinci Machine
   project)
> Client
 • Swing Application Framework (JSR-296)
 • Forward port Java SE6 u10 features
 • XRender pipeline for Java 2D




                                                     4
Modularity
 Project Jigsaw



                  5
Size Matters
> JDK is big, really big
  • JDK 1.x – 7 top level packages, 200 classes
  • JDK 7 – too many top level packages, over 4000 classes
  • About 12MB today
> Historical baggage
  • Build as a monolithic software system
> Problems
  • Download time, startup time, memory footprint, performance
  • Difficult to fit platform to newer mobile device
     -   CPU capable, but constrained by memory
> Current solution – use JDK 6u10
  • Kernel installer, quick startup feature
  • More like a painkiller, not the antidote

                                                                 6
New Module System for Java
> JSR-294 Improved Modularity Support in the Java
  Programming Language
> Requirements for JSR-294
  •   Integrate with the VM
  •   Integrate with the language
  •   Integrate with (platform's) native packaging
  •   Support multi-module packages
  •   Support “friend” modules
> Open JDK's Project Jigsaw
  • Reference implementation for JSR-294
  • openjdk.java.net/projects/jigsaw
  • Can have other type of module systems based on OSGi,
      IPS, Debian, etc.

                                                           7
Modularizing You Code
planetjdk/src/
            org/planetjdk/aggregator/Main.java




                       Modularize


planetjdk/src/
            org/planetjdk/aggregator/Main.java
            module-info.java


                                                 8
module-info.java                       Module name

 module org.planetjdk.aggregator {
                                       Module system
     system jigsaw;
     requires module jdom;
     requires module tagsoup;
     requires module rome;
     requires module rome-fetcher;       Dependencies
     requires module joda-time;
     requires module java-xml;
     requires module java-base;
     class org.planetjdk.aggregator.Main;
 }
                                            Main class
                                                         9
Compiling Modules
javac -modulepath planetjdk/src:rssutils/rome
     org.planetjdk.aggregator/module-info.java
     org.planetjdk.aggregator/org/...
     com.sun.syndication/module-info.java
     com.sun.syndication/com/...


 > Infers classes in org.planetjdk.aggregator/* belongs to
   module org.planetjdk.aggregator
   • From module-info.java
 > Handles mutual dependency
   • Module A dependent on Module B which is dependent on
     Module A
                                                             10
Running Modules

java -modulepath planetjdk/cls:rssutils/rome
  -m org.planetjdk.aggregator




> Launcher will look for org.planetjdk.aggregator from
  modulepath and executes it
  • Assuming that module is a root module




                                                         11
Module Versioning
 module org.planetjdk.aggregator @ 1.0 {
   system jigsaw;
   requires module jdom @ 1.*;
   requires module tagsoup @ 1.2.*;
   requires module rome @ =1.0;
   requires module rome-fetcher @ =1.0;
   requires module joda-time @ [1.6,2.0);
   requires module java-xml @ 7.*;
   requires module java-base @ 7.*;
   class org.planetjdk.aggregator.Main;
 }

                                            12
Native Packaging
  > Java does not integrate well with native OS
    • JAR files have no well defined relationship to native OS
      packaging
  > Build native packaging from module information
  > New tool – jpkg
javac -modulepath planetjdk/src:rssutils/rome
  -d build/modules org.planetjdk.aggregator/module-info.java
  org.planetjdk.aggregator/org/...


jpkg -L planetjdk/cls:rssutils/rome -m build/modules
   deb -c aggregator


sudo dpkg -i org.planetjdk.aggregator_1.0_all.deb
/usr/bin/aggregator
                                                                 13
Small
(Language)
 Changes
  Project Coin

                 14
“Why don't you add X to Java?”
>Assumption is that adding features is always good
>Application
  •   Application competes on the basis of completeness
  •   User cannot do X until application supports it
  •   Features rarely interacts “intimately” with each other
  •   Conclusion: more features are better
>Language
  •   Languages (most) are Turing complete
  •   Can always do X; question is how elegantly
  •   Features often interact with each other
  •   Conclusion: fewer, more regular features are better



                                                               15
Adding X To Java
> Must be compatible with existing code
  • assert and enum keywords breaks old code
> Must respect Java's abstract model
   • Should we allowing padding/aligning object sizes?
> Must leave room for future expansion
   • Syntax/semantics of new feature should not conflict with
     syntax/semantics of existing and/or potential features
   • Allow consistent evolution




                                                                16
Changing Java Is Really Hard Work
> Update the JSL
> Implement it in the compiler
> Add essential library support
> Write test
> Update the VM specs
> Update the VM and class file tools
> Update JNI
> Update reflection APIs
> Update serialization support
> Update javadoc output

                                       17
Better Integer Literals
> Binary literals
 int mask = 0b1010;

> With underscores
 int bigMask = 0b1010_0101;
 long big = 9_223_783_036_967_937L;


> Unsigned literals
 byte b = 0xffu;



                                      18
Better Type Inference


 Map<String, Integer> foo =
     new HashMap<String, Integer>();

 Map<String, Integer> foo =
     new HashMap<>();




                                       19
Strings in Switch
> Strings are constants too
       String s = ...;
       switch (s) {
         case "foo":
            return 1;

           case "bar":
             Return 2;

           default:
             return 0;
       }
                              20
Resource Management
> Manually closing resources is tricky and tedious
   public void copy(String src, String dest) throws IOException {
      InputStream in = new FileInputStream(src);
      try {
          OutputStream out = new FileOutputStream(dest);
          try {
             byte[] buf = new byte[8 * 1024];
             int n;
             while ((n = in.read(buf)) >= 0)
                 out.write(buf, 0, n);
          } finally {
             out.close();
          }
      } finally {
          in.close();
   }}

                                                                    21
Automatic Resource Management

static void copy(String src, String dest) throws IOException {
    try (InputStream in = new FileInputStream(src);
         OutputStream out = new FileOutputStream(dest)) {
        byte[] buf = new byte[8192];
        int n;
        while ((n = in.read(buf)) >= 0)
            out.write(buf, 0, n);
    }
   //in and out closes
}




                                                             22
Index Syntax for Lists and Maps


 List<String> list =
   Arrays.asList(new String[] {"a", "b", "c"});
 String firstElement = list[0];

 Map<Integer, String> map = new HashMap<>();
 map[Integer.valueOf(1)] = "One";




                                                  23
Dynamic
 Languages
  Support
Da Vinci Machine Proejct

                           24
Virtual Machines
> A software implementation of a specific computer
  architecture
  • Could be a real hardware (NES) or fictitious (z-machine)
> Popular in current deployments
  • VirtualBox, VMWare, VirtualPC, Parallels, etc
> “Every problem in computer science can be solved by
  adding a layer of indirection” – Butler Lampson
  • VM is the indirection layer
  • Abstraction from hardware
  • Provides portability




                                                               25
VM Have Mostly Won the Day
> Lots of languages today are targeting VM
  • Writing native compiler is a lot of work
> Why? Language need runtime support
  • Memory management, reflection, security, concurrency
    controls, tools, libraries, etc
> VM based systems provides these
  • Some features are part of the VM
> Lots of VM for lots of different languages
  • JVM, CLR, Dalvik, Smalltalk, Perl, Python, YARV, Rubinius,
    Tamarin, Valgrind (C++!), Lua, Postscript, Flash, p-code,
    Zend, etc



                                                                 26
JVM Specification



“The Java virtual machine knows nothing about
the Java programming language, only of a
particular binary format, the class file format.”
                             1.2 The Java Virtual Machine




                                                            27
JVM Architecture
> Stack based
  • Push operand on to the stack
  • Instructions operates by popping data off the stack
  • Pushes result back on the stack
> Data types
  • Eight primitive types, objects and arrays
> Object model – single inheritance with interfaces
> Method resolution
  • Receiver and method name
  • Statically typed for parameters and return types
  • Dynamic linking + static type checking
     -   Verified at runtime


                                                          28
Languages on the Java Virtual Machine
                                                                                     Tea               iScript
 Zigzag                                              JESS                              Jickle
                      Modula-2                                             Lisp
                                        Nice
                                                              CAL                                 JavaScript
          Correlate                                                                  JudoScript
                              Simkin                     Drools
                                                                      Basic
 Icon        Groovy                       Eiffel                                                         Luck
                                                              v-language                     Pascal
                              Prolog              Mini
                      Tcl                                               PLAN               Hojo          Scala
Rexx                        JavaFX Script                                         Funnel
                                                                                                      FScript
             Tiger          Anvil                                     Yassl                       Oberon
    E                                 Smalltalk
             Logo
                              Tiger
                                                                      JHCR                 JRuby
  Ada                            G                                  Scheme                               Sather
                                                  Clojure
 Processing                             Dawn                                      Phobos              Sleep
                            WebL                                  TermWare
                                               LLP                                     Pnuts          Bex Script
             BeanShell                           Forth            PHP
                                        C#                           SALSA
                                                  Yoix                             ObjectScript
                        Jython                                    Piccola                                          29


                                                                                                                        29
Pain Points for Dynamic Languages
> Method invocation
  • Including linking and selection
> New view points on Java types
  • List versus LIST
> Boxed values
  • Integer versus fixnum
> Special control structures
  • Tailcall, generators, continuations, etc
> What is the one change in the JVM that would make
  life better for dynamic languages?
  • Flexible method calls!



                                                      30
Method Invocation Today
String s = “Hello World”;
System.out.println(s);
   1: ldc #2        // Push String, s, onto stack
   2: astore_1      // Pop string and store in local
   3: getstatic #3 // Get static field
               java/lang/System.out:Ljava/io/PrintStream
   4: aload_1       // Load string ref from local var
   5: invokevirtual #4; //Method java/io/PrintStream.println:
                         //(Ljava/lang/String;)V
> Receiver type must conform to the resolved type of
  the call site
> Call methods must always exist
> Symbolic name is the name of an actual method
> Four 'invoke' bytecode
   • invokevirtual, invokeinterface, invokestatic, invokespecial
                                                                   31
Bootstrapping Method Handle




                              32
invokedynamic Byte Code
0: aload_1
1: aload_2
2: invokedynamic #3 //Name and type only lessThan:
              //(Ljava/lang/Object;Ljava/lang/Object;)Z
5: if_icmpeq

                                        Call site reifies the call




>



    pink thing = CallSite object
    green thing = MethodHandle object
                                                                     33
What Will Not Be in JDK7
> Closures
> Small Language changes that were proposed
  • Improved exception handling (safe rethrow, multi-catch)
  • Elvis and other null-safe operators
  • Large arrays
> Other language features
  • Reified generic types
  • First class properties
  • Operator overloading
> JSR-295 Beans binding
> JSR-277 Java Module System


                                                              34
JavaFX
> Develop Rich Internet Applications using Java
> JavaFX scripting language
  • Leverages Java platform: JVM, Class libraries
  • Simple integration of existing Java code
> Powerful language features
  • Binding
  • Effects
  • Animations




                                                    35
Added in JavaFX 1.1
> Official support for JavaFX Mobile
  • Mobile Emulator
> Language Improvements
  • Addition of Java primitive types (float, double, long, int, short, byte, char)
  • Improved Language Reference Guide
> Performance and Stability Improvements
  • Desktop Runtime updated to improve performance and stability
> Additional Improvements
  • Better support for mobile/desktop apps using the same code-base
  • Improved “cross domain” access
  • Standard navigation method for cross-device content



                                                                                     36
JavaFX 1.2: Released at JavaOne 2009
> UI Control components
  • Button, CheckBox, etc
> UI Chart components
  • LineChart, BubbleChart, BarChart, etc
> Solaris and Linux supported!!!!
  • GStreamer media support
> RealTime Streaming Protocol (RTSP) support
> Production suite now supports Adobe CS4




                                               37
Summary
> Lots of new things coming
  • Some not covered here
  • Includes annotations for Java type, Swing application
    framework, JXLayer, date picker, etc.
> Java on the client is alive and well
> JavaFX becoming mature
> Platform will be more robust and scalable
> Coming soon in 2010




                                                            38
JDK7: What The Future
        Holds For Java

     Simon Ritter
     Technology Evangelist
      simon.ritter@sun.com




39
                             39

More Related Content

What's hot

Java Course 13: JDBC & Logging
Java Course 13: JDBC & LoggingJava Course 13: JDBC & Logging
Java Course 13: JDBC & LoggingAnton Keks
 
What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & javaEugene Bogaart
 
NoSQL @ CodeMash 2010
NoSQL @ CodeMash 2010NoSQL @ CodeMash 2010
NoSQL @ CodeMash 2010Ben Scofield
 
JavaOne 2011 - JVM Bytecode for Dummies
JavaOne 2011 - JVM Bytecode for DummiesJavaOne 2011 - JVM Bytecode for Dummies
JavaOne 2011 - JVM Bytecode for DummiesCharles Nutter
 
iOS Multithreading
iOS MultithreadingiOS Multithreading
iOS MultithreadingRicha Jain
 
Bring your infrastructure under control with Infrastructor
Bring your infrastructure under control with InfrastructorBring your infrastructure under control with Infrastructor
Bring your infrastructure under control with InfrastructorStanislav Tiurikov
 
jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasualYuji Kubota
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmerselliando dias
 
Breaking the-database-type-barrier-replicating-across-different-dbms
Breaking the-database-type-barrier-replicating-across-different-dbmsBreaking the-database-type-barrier-replicating-across-different-dbms
Breaking the-database-type-barrier-replicating-across-different-dbmsLinas Virbalas
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)goccy
 
Java Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & ServletsJava Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & ServletsAnton Keks
 
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...npinto
 

What's hot (20)

MySQL Proxy tutorial
MySQL Proxy tutorialMySQL Proxy tutorial
MySQL Proxy tutorial
 
JavaOne 2011 Recap
JavaOne 2011 RecapJavaOne 2011 Recap
JavaOne 2011 Recap
 
Java Course 13: JDBC & Logging
Java Course 13: JDBC & LoggingJava Course 13: JDBC & Logging
Java Course 13: JDBC & Logging
 
java
javajava
java
 
What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & java
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
NoSQL @ CodeMash 2010
NoSQL @ CodeMash 2010NoSQL @ CodeMash 2010
NoSQL @ CodeMash 2010
 
JavaOne 2011 - JVM Bytecode for Dummies
JavaOne 2011 - JVM Bytecode for DummiesJavaOne 2011 - JVM Bytecode for Dummies
JavaOne 2011 - JVM Bytecode for Dummies
 
Whats New In Java Ee 6
Whats New In Java Ee 6Whats New In Java Ee 6
Whats New In Java Ee 6
 
iOS Multithreading
iOS MultithreadingiOS Multithreading
iOS Multithreading
 
Bring your infrastructure under control with Infrastructor
Bring your infrastructure under control with InfrastructorBring your infrastructure under control with Infrastructor
Bring your infrastructure under control with Infrastructor
 
HotSpotコトハジメ
HotSpotコトハジメHotSpotコトハジメ
HotSpotコトハジメ
 
jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasual
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmers
 
Java 7: Quo vadis?
Java 7: Quo vadis?Java 7: Quo vadis?
Java 7: Quo vadis?
 
Core java1
Core java1Core java1
Core java1
 
Breaking the-database-type-barrier-replicating-across-different-dbms
Breaking the-database-type-barrier-replicating-across-different-dbmsBreaking the-database-type-barrier-replicating-across-different-dbms
Breaking the-database-type-barrier-replicating-across-different-dbms
 
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
Java Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & ServletsJava Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & Servlets
 
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
IAP09 CUDA@MIT 6.963 - Guest Lecture: Out-of-Core Programming with NVIDIA's C...
 

Similar to Java Future S Ritter

Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevMattias Karlsson
 
Java jdk-update-nov10-sde-v3m
Java jdk-update-nov10-sde-v3mJava jdk-update-nov10-sde-v3m
Java jdk-update-nov10-sde-v3mSteve Elliott
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9Ivan Krylov
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVAHome
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS MeetupLINAGORA
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Leejaxconf
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Martijn Verburg
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containersDocker, Inc.
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Arun Gupta
 
Looming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdfLooming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdfjexp
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Arun Gupta
 
Dynamic Groovy Edges
Dynamic Groovy EdgesDynamic Groovy Edges
Dynamic Groovy EdgesJimmy Ray
 

Similar to Java Future S Ritter (20)

Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
 
Java jdk-update-nov10-sde-v3m
Java jdk-update-nov10-sde-v3mJava jdk-update-nov10-sde-v3m
Java jdk-update-nov10-sde-v3m
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containers
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
Writing Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason LeeWriting Plugged-in Java EE Apps: Jason Lee
Writing Plugged-in Java EE Apps: Jason Lee
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containers
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
Looming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdfLooming Marvelous - Virtual Threads in Java Javaland.pdf
Looming Marvelous - Virtual Threads in Java Javaland.pdf
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
How can your applications benefit from Java 9?
How can your applications benefit from Java 9?How can your applications benefit from Java 9?
How can your applications benefit from Java 9?
 
basic_java.ppt
basic_java.pptbasic_java.ppt
basic_java.ppt
 
java slides
java slidesjava slides
java slides
 
Dynamic Groovy Edges
Dynamic Groovy EdgesDynamic Groovy Edges
Dynamic Groovy Edges
 

More from catherinewall

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Building Modular Dynamic Web Apps Ben Hale
Building Modular Dynamic Web Apps   Ben HaleBuilding Modular Dynamic Web Apps   Ben Hale
Building Modular Dynamic Web Apps Ben Halecatherinewall
 
Infinispan The Future Of Os Data Grids Manik Surtani
Infinispan The Future Of Os Data Grids   Manik SurtaniInfinispan The Future Of Os Data Grids   Manik Surtani
Infinispan The Future Of Os Data Grids Manik Surtanicatherinewall
 
Design Decisions for iPhone Applications, Des Traynor, Contrast
Design Decisions for iPhone Applications, Des Traynor, ContrastDesign Decisions for iPhone Applications, Des Traynor, Contrast
Design Decisions for iPhone Applications, Des Traynor, Contrastcatherinewall
 
Creating New Interaction with the iPhone, Daniel Heffernan, Appschool
Creating New Interaction with the iPhone, Daniel Heffernan, AppschoolCreating New Interaction with the iPhone, Daniel Heffernan, Appschool
Creating New Interaction with the iPhone, Daniel Heffernan, Appschoolcatherinewall
 
Ronan Geraghty Microsoft BizSpark Introduction
Ronan Geraghty Microsoft BizSpark IntroductionRonan Geraghty Microsoft BizSpark Introduction
Ronan Geraghty Microsoft BizSpark Introductioncatherinewall
 
Knocking on Heavens Door - The Business Reality of Doing Business in the Cloud
Knocking on Heavens Door - The Business Reality of Doing Business in the CloudKnocking on Heavens Door - The Business Reality of Doing Business in the Cloud
Knocking on Heavens Door - The Business Reality of Doing Business in the Cloudcatherinewall
 
Cloud Computing in Practice: Fast Application Development and Delivery on For...
Cloud Computing in Practice: Fast Application Development and Delivery on For...Cloud Computing in Practice: Fast Application Development and Delivery on For...
Cloud Computing in Practice: Fast Application Development and Delivery on For...catherinewall
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Enginecatherinewall
 
Emerging Technology in the Cloud! Real Life Examples. Pol Mac Aonghusa
Emerging Technology in the Cloud! Real Life Examples.  Pol Mac AonghusaEmerging Technology in the Cloud! Real Life Examples.  Pol Mac Aonghusa
Emerging Technology in the Cloud! Real Life Examples. Pol Mac Aonghusacatherinewall
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTscatherinewall
 
How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...
How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...
How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...catherinewall
 
Green Computing - A Leadership Role - Tom Moriarty, DELL
Green Computing - A Leadership Role - Tom Moriarty, DELLGreen Computing - A Leadership Role - Tom Moriarty, DELL
Green Computing - A Leadership Role - Tom Moriarty, DELLcatherinewall
 
Green IT @ STRATO - Rene Weinholtz
Green IT @ STRATO - Rene WeinholtzGreen IT @ STRATO - Rene Weinholtz
Green IT @ STRATO - Rene Weinholtzcatherinewall
 
The Business Challenges of the future Low Carbon Economy - Niall Brady
The Business Challenges of the future Low Carbon Economy - Niall BradyThe Business Challenges of the future Low Carbon Economy - Niall Brady
The Business Challenges of the future Low Carbon Economy - Niall Bradycatherinewall
 
The Electric Grid 2.0 - Fergus Wheatly
The Electric Grid 2.0 - Fergus WheatlyThe Electric Grid 2.0 - Fergus Wheatly
The Electric Grid 2.0 - Fergus Wheatlycatherinewall
 
SMART2020: ICT & Climate Change. Opportunities or Threat? Chris Tuppen, BT
SMART2020: ICT & Climate Change.  Opportunities or Threat? Chris Tuppen, BTSMART2020: ICT & Climate Change.  Opportunities or Threat? Chris Tuppen, BT
SMART2020: ICT & Climate Change. Opportunities or Threat? Chris Tuppen, BTcatherinewall
 
Green IT: Moving Beyond the 2% Solution - Doug Neal
Green IT: Moving Beyond the 2% Solution - Doug NealGreen IT: Moving Beyond the 2% Solution - Doug Neal
Green IT: Moving Beyond the 2% Solution - Doug Nealcatherinewall
 

More from catherinewall (20)

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Building Modular Dynamic Web Apps Ben Hale
Building Modular Dynamic Web Apps   Ben HaleBuilding Modular Dynamic Web Apps   Ben Hale
Building Modular Dynamic Web Apps Ben Hale
 
Infinispan The Future Of Os Data Grids Manik Surtani
Infinispan The Future Of Os Data Grids   Manik SurtaniInfinispan The Future Of Os Data Grids   Manik Surtani
Infinispan The Future Of Os Data Grids Manik Surtani
 
Design Decisions for iPhone Applications, Des Traynor, Contrast
Design Decisions for iPhone Applications, Des Traynor, ContrastDesign Decisions for iPhone Applications, Des Traynor, Contrast
Design Decisions for iPhone Applications, Des Traynor, Contrast
 
Creating New Interaction with the iPhone, Daniel Heffernan, Appschool
Creating New Interaction with the iPhone, Daniel Heffernan, AppschoolCreating New Interaction with the iPhone, Daniel Heffernan, Appschool
Creating New Interaction with the iPhone, Daniel Heffernan, Appschool
 
Ronan Geraghty Microsoft BizSpark Introduction
Ronan Geraghty Microsoft BizSpark IntroductionRonan Geraghty Microsoft BizSpark Introduction
Ronan Geraghty Microsoft BizSpark Introduction
 
BackUpEarth
BackUpEarthBackUpEarth
BackUpEarth
 
Amazon Web Services
Amazon Web ServicesAmazon Web Services
Amazon Web Services
 
Knocking on Heavens Door - The Business Reality of Doing Business in the Cloud
Knocking on Heavens Door - The Business Reality of Doing Business in the CloudKnocking on Heavens Door - The Business Reality of Doing Business in the Cloud
Knocking on Heavens Door - The Business Reality of Doing Business in the Cloud
 
Cloud Computing in Practice: Fast Application Development and Delivery on For...
Cloud Computing in Practice: Fast Application Development and Delivery on For...Cloud Computing in Practice: Fast Application Development and Delivery on For...
Cloud Computing in Practice: Fast Application Development and Delivery on For...
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Engine
 
Emerging Technology in the Cloud! Real Life Examples. Pol Mac Aonghusa
Emerging Technology in the Cloud! Real Life Examples.  Pol Mac AonghusaEmerging Technology in the Cloud! Real Life Examples.  Pol Mac Aonghusa
Emerging Technology in the Cloud! Real Life Examples. Pol Mac Aonghusa
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTs
 
How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...
How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...
How ICT will help deliver ESB\'s Sustainability Strategy, Padraig McManus, CE...
 
Green Computing - A Leadership Role - Tom Moriarty, DELL
Green Computing - A Leadership Role - Tom Moriarty, DELLGreen Computing - A Leadership Role - Tom Moriarty, DELL
Green Computing - A Leadership Role - Tom Moriarty, DELL
 
Green IT @ STRATO - Rene Weinholtz
Green IT @ STRATO - Rene WeinholtzGreen IT @ STRATO - Rene Weinholtz
Green IT @ STRATO - Rene Weinholtz
 
The Business Challenges of the future Low Carbon Economy - Niall Brady
The Business Challenges of the future Low Carbon Economy - Niall BradyThe Business Challenges of the future Low Carbon Economy - Niall Brady
The Business Challenges of the future Low Carbon Economy - Niall Brady
 
The Electric Grid 2.0 - Fergus Wheatly
The Electric Grid 2.0 - Fergus WheatlyThe Electric Grid 2.0 - Fergus Wheatly
The Electric Grid 2.0 - Fergus Wheatly
 
SMART2020: ICT & Climate Change. Opportunities or Threat? Chris Tuppen, BT
SMART2020: ICT & Climate Change.  Opportunities or Threat? Chris Tuppen, BTSMART2020: ICT & Climate Change.  Opportunities or Threat? Chris Tuppen, BT
SMART2020: ICT & Climate Change. Opportunities or Threat? Chris Tuppen, BT
 
Green IT: Moving Beyond the 2% Solution - Doug Neal
Green IT: Moving Beyond the 2% Solution - Doug NealGreen IT: Moving Beyond the 2% Solution - Doug Neal
Green IT: Moving Beyond the 2% Solution - Doug Neal
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Java Future S Ritter

  • 1. What The Future Holds For Java: JDK7 and JavaFX Simon Ritter Technology Evangelist
  • 2. Disclaimer The information in this presentation concerns forward-looking statements based on current expectations and beliefs about future events that are inherently susceptible to uncertainty and changes in circumstance etc. etc. etc. 2
  • 3. JDK 7 Features > Language • Annotations on Java types • Small language changes (Project Coin) • Modularity (JSR-294) > Core • Modularisation (Project Jigsaw) • Concurrency and collections updates • More new IO APIs (NIO.2) • Additional network protocol support • Eliptic curve cryptography • Unicode 5.1 3
  • 4. JDK 7 Features > VM • Compressed 64-bit pointers • Garbage-First GC • Support for dynamic languages (Da Vinci Machine project) > Client • Swing Application Framework (JSR-296) • Forward port Java SE6 u10 features • XRender pipeline for Java 2D 4
  • 6. Size Matters > JDK is big, really big • JDK 1.x – 7 top level packages, 200 classes • JDK 7 – too many top level packages, over 4000 classes • About 12MB today > Historical baggage • Build as a monolithic software system > Problems • Download time, startup time, memory footprint, performance • Difficult to fit platform to newer mobile device - CPU capable, but constrained by memory > Current solution – use JDK 6u10 • Kernel installer, quick startup feature • More like a painkiller, not the antidote 6
  • 7. New Module System for Java > JSR-294 Improved Modularity Support in the Java Programming Language > Requirements for JSR-294 • Integrate with the VM • Integrate with the language • Integrate with (platform's) native packaging • Support multi-module packages • Support “friend” modules > Open JDK's Project Jigsaw • Reference implementation for JSR-294 • openjdk.java.net/projects/jigsaw • Can have other type of module systems based on OSGi, IPS, Debian, etc. 7
  • 8. Modularizing You Code planetjdk/src/ org/planetjdk/aggregator/Main.java Modularize planetjdk/src/ org/planetjdk/aggregator/Main.java module-info.java 8
  • 9. module-info.java Module name module org.planetjdk.aggregator { Module system system jigsaw; requires module jdom; requires module tagsoup; requires module rome; requires module rome-fetcher; Dependencies requires module joda-time; requires module java-xml; requires module java-base; class org.planetjdk.aggregator.Main; } Main class 9
  • 10. Compiling Modules javac -modulepath planetjdk/src:rssutils/rome org.planetjdk.aggregator/module-info.java org.planetjdk.aggregator/org/... com.sun.syndication/module-info.java com.sun.syndication/com/... > Infers classes in org.planetjdk.aggregator/* belongs to module org.planetjdk.aggregator • From module-info.java > Handles mutual dependency • Module A dependent on Module B which is dependent on Module A 10
  • 11. Running Modules java -modulepath planetjdk/cls:rssutils/rome -m org.planetjdk.aggregator > Launcher will look for org.planetjdk.aggregator from modulepath and executes it • Assuming that module is a root module 11
  • 12. Module Versioning module org.planetjdk.aggregator @ 1.0 { system jigsaw; requires module jdom @ 1.*; requires module tagsoup @ 1.2.*; requires module rome @ =1.0; requires module rome-fetcher @ =1.0; requires module joda-time @ [1.6,2.0); requires module java-xml @ 7.*; requires module java-base @ 7.*; class org.planetjdk.aggregator.Main; } 12
  • 13. Native Packaging > Java does not integrate well with native OS • JAR files have no well defined relationship to native OS packaging > Build native packaging from module information > New tool – jpkg javac -modulepath planetjdk/src:rssutils/rome -d build/modules org.planetjdk.aggregator/module-info.java org.planetjdk.aggregator/org/... jpkg -L planetjdk/cls:rssutils/rome -m build/modules deb -c aggregator sudo dpkg -i org.planetjdk.aggregator_1.0_all.deb /usr/bin/aggregator 13
  • 14. Small (Language) Changes Project Coin 14
  • 15. “Why don't you add X to Java?” >Assumption is that adding features is always good >Application • Application competes on the basis of completeness • User cannot do X until application supports it • Features rarely interacts “intimately” with each other • Conclusion: more features are better >Language • Languages (most) are Turing complete • Can always do X; question is how elegantly • Features often interact with each other • Conclusion: fewer, more regular features are better 15
  • 16. Adding X To Java > Must be compatible with existing code • assert and enum keywords breaks old code > Must respect Java's abstract model • Should we allowing padding/aligning object sizes? > Must leave room for future expansion • Syntax/semantics of new feature should not conflict with syntax/semantics of existing and/or potential features • Allow consistent evolution 16
  • 17. Changing Java Is Really Hard Work > Update the JSL > Implement it in the compiler > Add essential library support > Write test > Update the VM specs > Update the VM and class file tools > Update JNI > Update reflection APIs > Update serialization support > Update javadoc output 17
  • 18. Better Integer Literals > Binary literals int mask = 0b1010; > With underscores int bigMask = 0b1010_0101; long big = 9_223_783_036_967_937L; > Unsigned literals byte b = 0xffu; 18
  • 19. Better Type Inference Map<String, Integer> foo = new HashMap<String, Integer>(); Map<String, Integer> foo = new HashMap<>(); 19
  • 20. Strings in Switch > Strings are constants too String s = ...; switch (s) { case "foo": return 1; case "bar": Return 2; default: return 0; } 20
  • 21. Resource Management > Manually closing resources is tricky and tedious public void copy(String src, String dest) throws IOException { InputStream in = new FileInputStream(src); try { OutputStream out = new FileOutputStream(dest); try { byte[] buf = new byte[8 * 1024]; int n; while ((n = in.read(buf)) >= 0) out.write(buf, 0, n); } finally { out.close(); } } finally { in.close(); }} 21
  • 22. Automatic Resource Management static void copy(String src, String dest) throws IOException { try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dest)) { byte[] buf = new byte[8192]; int n; while ((n = in.read(buf)) >= 0) out.write(buf, 0, n); } //in and out closes } 22
  • 23. Index Syntax for Lists and Maps List<String> list = Arrays.asList(new String[] {"a", "b", "c"}); String firstElement = list[0]; Map<Integer, String> map = new HashMap<>(); map[Integer.valueOf(1)] = "One"; 23
  • 24. Dynamic Languages Support Da Vinci Machine Proejct 24
  • 25. Virtual Machines > A software implementation of a specific computer architecture • Could be a real hardware (NES) or fictitious (z-machine) > Popular in current deployments • VirtualBox, VMWare, VirtualPC, Parallels, etc > “Every problem in computer science can be solved by adding a layer of indirection” – Butler Lampson • VM is the indirection layer • Abstraction from hardware • Provides portability 25
  • 26. VM Have Mostly Won the Day > Lots of languages today are targeting VM • Writing native compiler is a lot of work > Why? Language need runtime support • Memory management, reflection, security, concurrency controls, tools, libraries, etc > VM based systems provides these • Some features are part of the VM > Lots of VM for lots of different languages • JVM, CLR, Dalvik, Smalltalk, Perl, Python, YARV, Rubinius, Tamarin, Valgrind (C++!), Lua, Postscript, Flash, p-code, Zend, etc 26
  • 27. JVM Specification “The Java virtual machine knows nothing about the Java programming language, only of a particular binary format, the class file format.” 1.2 The Java Virtual Machine 27
  • 28. JVM Architecture > Stack based • Push operand on to the stack • Instructions operates by popping data off the stack • Pushes result back on the stack > Data types • Eight primitive types, objects and arrays > Object model – single inheritance with interfaces > Method resolution • Receiver and method name • Statically typed for parameters and return types • Dynamic linking + static type checking - Verified at runtime 28
  • 29. Languages on the Java Virtual Machine Tea iScript Zigzag JESS Jickle Modula-2 Lisp Nice CAL JavaScript Correlate JudoScript Simkin Drools Basic Icon Groovy Eiffel Luck v-language Pascal Prolog Mini Tcl PLAN Hojo Scala Rexx JavaFX Script Funnel FScript Tiger Anvil Yassl Oberon E Smalltalk Logo Tiger JHCR JRuby Ada G Scheme Sather Clojure Processing Dawn Phobos Sleep WebL TermWare LLP Pnuts Bex Script BeanShell Forth PHP C# SALSA Yoix ObjectScript Jython Piccola 29 29
  • 30. Pain Points for Dynamic Languages > Method invocation • Including linking and selection > New view points on Java types • List versus LIST > Boxed values • Integer versus fixnum > Special control structures • Tailcall, generators, continuations, etc > What is the one change in the JVM that would make life better for dynamic languages? • Flexible method calls! 30
  • 31. Method Invocation Today String s = “Hello World”; System.out.println(s); 1: ldc #2 // Push String, s, onto stack 2: astore_1 // Pop string and store in local 3: getstatic #3 // Get static field java/lang/System.out:Ljava/io/PrintStream 4: aload_1 // Load string ref from local var 5: invokevirtual #4; //Method java/io/PrintStream.println: //(Ljava/lang/String;)V > Receiver type must conform to the resolved type of the call site > Call methods must always exist > Symbolic name is the name of an actual method > Four 'invoke' bytecode • invokevirtual, invokeinterface, invokestatic, invokespecial 31
  • 33. invokedynamic Byte Code 0: aload_1 1: aload_2 2: invokedynamic #3 //Name and type only lessThan: //(Ljava/lang/Object;Ljava/lang/Object;)Z 5: if_icmpeq Call site reifies the call > pink thing = CallSite object green thing = MethodHandle object 33
  • 34. What Will Not Be in JDK7 > Closures > Small Language changes that were proposed • Improved exception handling (safe rethrow, multi-catch) • Elvis and other null-safe operators • Large arrays > Other language features • Reified generic types • First class properties • Operator overloading > JSR-295 Beans binding > JSR-277 Java Module System 34
  • 35. JavaFX > Develop Rich Internet Applications using Java > JavaFX scripting language • Leverages Java platform: JVM, Class libraries • Simple integration of existing Java code > Powerful language features • Binding • Effects • Animations 35
  • 36. Added in JavaFX 1.1 > Official support for JavaFX Mobile • Mobile Emulator > Language Improvements • Addition of Java primitive types (float, double, long, int, short, byte, char) • Improved Language Reference Guide > Performance and Stability Improvements • Desktop Runtime updated to improve performance and stability > Additional Improvements • Better support for mobile/desktop apps using the same code-base • Improved “cross domain” access • Standard navigation method for cross-device content 36
  • 37. JavaFX 1.2: Released at JavaOne 2009 > UI Control components • Button, CheckBox, etc > UI Chart components • LineChart, BubbleChart, BarChart, etc > Solaris and Linux supported!!!! • GStreamer media support > RealTime Streaming Protocol (RTSP) support > Production suite now supports Adobe CS4 37
  • 38. Summary > Lots of new things coming • Some not covered here • Includes annotations for Java type, Swing application framework, JXLayer, date picker, etc. > Java on the client is alive and well > JavaFX becoming mature > Platform will be more robust and scalable > Coming soon in 2010 38
  • 39. JDK7: What The Future Holds For Java Simon Ritter Technology Evangelist simon.ritter@sun.com 39 39