Desktop Java™ Technology
Total Page:16
File Type:pdf, Size:1020Kb
Desktop Java™ Technology Thorsten Laux Chet Haase Sun Microsystems, Inc. TS-3160 2007 JavaOneSM Conference | Session TS-3160 | Goal Where We Are Where We’re Going 2007 JavaOneSM Conference | Session TS-3160 | 2 Agenda State of the Desktop World Where We Are Going Consumer JRE Release Future Platform Features 2007 JavaOneSM Conference | Session TS-3160 | 3 Agenda State of the Desktop World Where We Are Going Consumer JRE Release Future Platform Features 2007 JavaOneSM Conference | Session TS-3160 | 4 How Much Java Technology Is Out There? ● > 91% of all PCs run Java platform* ● ~ 77% of all Java technology-enabled PCs run Sun’s Java Platform, Standard Edition (Java SE platform)** ● Distribution through PC OEMs ● Nine of the top ten PC OEMs ship the JRE software ● Representing > 60% of all shipped PCs ● 58 white box vendors have signed JRE software redistribution agreements ● Download/installs ● ~ 44m installations/month for the last six months on Windows ● > 50M in January, February, April, 2007 * Omniture, April 2007 **Mapsolute/Map24.com, April 2007 2007 JavaOneSM Conference | Session TS-3160 | 5 Completed Java SE Platform Downloads Windows numbers only 55,000,000 50,000,000 45,000,000 40,000,000 35,000,000 30,000,000 25,000,000 20,000,000 15,000,000 10,000,000 5,000,000 0 1/2003 1/2004 1/2005 1/2006 1/2007 2007 JavaOneSM Conference | Session TS-3160 | 6 Where Does the Time Go? Evans Data Survey: Fall 2006 45 40 35 30 Desktop 25 Server Mobile 20 Others 15 10 5 0 Percentage of Java Development Time Spent Spring 05 Fall 05 Spring 06 Fall 06 2007 JavaOneSM Conference | Session TS-3160 | 7 Blurb.com Photo Album Creation and Publishing 2007 JavaOneSM Conference | Session TS-3160 | 8 Map24.com ● Maps, directions, local search in an applet ● Used on Yahoo’s European sites ● “One Million Applet Downloads a Day” ● Thursday@4:10 2007 JavaOneSM Conference | Session TS-3160 | 9 Google Presentation PowerPoint Viewer 2007 JavaOneSM Conference | Session TS-3160 | 10 CineShot Real-Time Quality Analysis and Capture for Video 2007 JavaOneSM Conference | Session TS-3160 | 11 Lightzone Photographic Digital Image Editing 2007 JavaOneSM Conference | Session TS-3160 | 12 MySpace Project Inglewood Media file uploader applet ● Most popular website in the galaxy (dude) ● Needed Java platform for richness + local access 2007 JavaOneSM Conference | Session TS-3160 | 13 Agenda State of the Desktop World Where We Are Going Consumer JRE Release Future Platform Features 2007 JavaOneSM Conference | Session TS-3160 | 14 Where We Are Going ™ ● JavaFX Script technology ● Expanding the developer base ™ ● Java Development Kit (JDK ) 6 Update for Consumers, JDK version 7 ● JavaFX Mobile technology ● Java SE platform APIs on Mobile Devices ● OpenJDK ● Open Sourcing the JDK 2007 JavaOneSM Conference | Session TS-3160 | 15 Expanding the Developer Base Java Software Developers JavaFX Script Script Developers Skill Required Visual Designers Volume 2007 JavaOneSM Conference | Session TS-3160 | 16 JavaFX Script Technology ● Declarative, statically typed scripting language ● Enables easier building and running of media-rich Java clients ™ ● Makes Swing and Java 2D API accessible to a much larger audience ● Early access available for the desktop now ● More at ● Keynote: Today@1:30PM ● Presentation: Wednesday@4:10PM, Thursday@1:30PM ● Lab: Thursday@3:50PM ● Chris Oliver’s blog: demos, tutorial http://blogs.sun.com/chrisoliver 2007 JavaOneSM Conference | Session TS-3160 | 17 DEMO JavaFX Technology 2007 JavaOneSM Conference | Session TS-3160 | 18 Java SE Platform: The Consumer Web Client ● Traditional sweet spots ● The first wave of Java v.1.1 consumer applets ● Enterprise applications and applets ™ ● Developer tools (NetBeans IDE, Eclipse, IDEA…) ● Large consumer desktop applications (LimeWire, Azureus…) ● The world has changed ● Java SE platform is now installed on most desktops ● Rich consumer clients and media are rapidly gaining importance ● The time is right for Java SE platform to become a primary consumer web client platform 2007 JavaOneSM Conference | Session TS-3160 | 19 Java SE Platform: The Consumer Web Client ● JDK v.6 update for consumers ● Based on JDK v.6 st ● Planned 1 half 2008 ● Eliminates the most important consumer issues ● Startup time, Download size, Install experience, Modern cross-platform L&F ● Will include JavaFX Script technology ● JDK v.7 ● Will have a new focus on consumer relevant features ● Media, Graphics, Animation, 3D support 2007 JavaOneSM Conference | Session TS-3160 | 20 JavaFX Mobile Technology: First Step in API Convergence ● Java technology is popular with desktop developers ● Cell phones are more powerful now than desktops were when many Java SE platform APIs were designed ● Sun will make desktop APIs available on future JavaFX stacks ™ ● e.g., Java SE Core APIs, Swing, Java 2D API… ● JavaFX Mobile technology includes Swing and 2D implementations 2007 JavaOneSM Conference | Session TS-3160 | 21 JavaFX Mobile Technology ● Calling all Swing developers Java SE platform and Swing… on a Phone! ● Desktop developers can now target phones with familiar Java technologies ● Go to the Mobility keynote and sessions for more ● Keynote: Today@3:20PM ● “Swing on a phone” ● Has a certain ring to it, doesn’t it? 2007 JavaOneSM Conference | Session TS-3160 | 22 OpenJDK ● How to help Desktop ● SwingLabs, http://swinglabs.dev.java.net ● Still the best place for new feature work projects ● JSR 295/296: java.net projects ● Beans Binding and the Swing Application Framework ● Starter desktop projects for OpenJDK ● Bugs ● Clearing encumbrances ● Session: “How to Hack in the OpenJDK” ● Tuesday @ 6:00PM, Thursday @ 2:50PM ● OpenJDK project: https://openjdk.dev.java.net/ 2007 JavaOneSM Conference | Session TS-3160 | 23 Desktop Roadmap (Dates are best-guess and may change) OpenJDK JavaFX for the Desktop JavaFX Script Eval Consumer Platform Features Consumer Enhancements, JavaFX Script Java SE 2007 2008 2007 JavaOneSM Conference | Session TS-3160 | 24 Agenda State of the Desktop World Where We Are Going Consumer JRE Release Future Platform Features 2007 JavaOneSM Conference | Session TS-3160 | 25 Java SE Platform v.6: Awesome Desktop Release ● Desktop API ● TrayIcon ● Improved native look & feel ● New OS support (Vista) ● SwingWorker ● Project Matisse and Group Layout ● Gray Rect fix ● JTable Sorting and Filtering ● LCD Text ● Single-Threaded Rendering ● Desktop AA Text Properties ● Better Curved Primitives ● Splash Screen ● Better Security Dialogs ● Graphics Acceleration Improvements ● Is anyone still reading this? 2007 JavaOneSM Conference | Session TS-3160 | 26 2007 JavaOneSM Conference | Session TS-3160 | 27 2007 JavaOneSM Conference | Session TS-3160 | 28 We’re Not Done Yet ● The bad news ● We have problems that need to be fixed ● Startup time, especially at first launch (“coldstart”) ● Install time and process ● JRE software detection and installation ● The good news ● We are aware of the problems ● We’re working on solutions ● We hope to deliver solutions in a reasonable timeframe 2007 JavaOneSM Conference | Session TS-3160 | 29 Problem: Startup Time ● Actually 2 different “startup” problems ● Coldstart: First run since boot ● Typical times: 5–10+ seconds ● Warmstart: After recent run of VM ● Typical times: < 1–2 seconds ● Warmstart is acceptable ● Lots of work over the years + faster machines ● Coldstart is not 2007 JavaOneSM Conference | Session TS-3160 | 30 Problem: Startup Time ● Coldstart is an OS issue ● All about the disk cache ● Java platform reads a lot from disk at startup ● Some improvements over the years ● Class Data Sharing ● Rearranging rt.jar ● OS-level prefetch (native libraries only) ● But it’s still not nearly enough ● What to do? 2007 JavaOneSM Conference | Session TS-3160 | 31 Solution: Quickstarter ● Pre-load the cache, before launch ● At boot, at browser launch, whenever ● Note: Not the same as having a running VM ● Cooperates with the OS ● Memory still available for other apps ● OS will flush disk cache pages as necessary 2007 JavaOneSM Conference | Session TS-3160 | 32 Problem: Install Time ● The JRE implementation is, well, big ● 7–15 MB download ● Extracted to 40+ MB for rt.jar ● Plus other jarfiles, native libraries, resource files, … ● All of this takes time ● Download ● Unzip ● Unpack200 ● Copying bits around ● It’s a wonder that it’s as quick as it is… 2007 JavaOneSM Conference | Session TS-3160 | 33 Solution: Kernel ● Every app needs some core functionality ● VM, networking, security, classloader ● …plus other stuff on demand ● Swing, AWT, 2D, CORBA ● Kernel downloads and installs ● Bare essentials immediately ● Additional dependencies next ● “ClassNotFound” culprits as needed ● Everything else eventually 2007 JavaOneSM Conference | Session TS-3160 | 34 Kernel: Bare Essentials 367KB4.3 Core JRE Web Start 9.1 197KB Plug-in Installer 1374KB 3.1 82KB 2.4 2007 JavaOneSM Conference | Session TS-3160 | 35 Kernel: App-Specific Sizes 2007 JavaOneSM Conference | Session TS-3160 | 36 Problem: JRE Software Detection ● No good way to detect JRE software existence and version from browser ● Developers use nifty “Get Java” button ● Which takes users away from the site ● Applets constrained to lowest-common- denominator APIs ™ ● MS VM, circa Java Development Kit (JDK ) 1.1 2007 JavaOneSM Conference | Session TS-3160 | 37 Solution: Deployment Toolkit ™ ● JavaScript technology solution hosted by Sun ● Developer uses simple script on their site ● Link to Sun’s script ● Detects JRE software existence and version ● Depending on app requirements