SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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...
 

Ähnlich wie What The Future Holds For Java: JDK7 and JavaFX

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 - 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
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containersDocker, Inc.
 
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
 

Ähnlich wie What The Future Holds For Java: JDK7 and JavaFX (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 - 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
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containers
 
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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

What The Future Holds For Java: JDK7 and JavaFX

  • 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