Deploying Java™ Platform, Standard Edition (Java SE Platform) in Today’S Embedded Devices

Deploying Java™ Platform, Standard Edition (Java SE Platform) in Today’S Embedded Devices

Deploying Java™ Platform, Standard Edition (Java SE Platform) in Today’s Embedded Devices Bob Vandette Senior Staff Engineer Sun Microsystems, Inc. http://www.sun.com TS-2602 2007 JavaOneSM Conference | Session TS-2602 | Deploying Java SE Platform in Today’s Embedded Devices Goal of this presentation Learn the basic steps involved in developing and deploying embedded solutions based on Java Standard Edition platform for Embedded 2007 JavaOneSM Conference | Session TS-2602 | 2 Agenda Define Your Target Device Requirements Which Java Platform Edition Is Right for You Selecting Support Libraries Developing Your Application Code Building Your Target Image Debugging Performance Tuning Q&A 2007 JavaOneSM Conference | Session TS-2602 | 3 Agenda Define Your Target Device Requirements Which Java Platform Edition Is Right for You Selecting Support Libraries Developing Your Application Code Building Your Target Image Debugging Performance Tuning Q&A 2007 JavaOneSM Conference | Session TS-2602 | 4 Defining Target Device Requirements ● Hardware ● CPU ● Persistent memory: ROM, flash/stick, disk ● Volatile memory: RAM ● Peripheral I/O (optional): ● Networking: Ethernet, wireless, Bluetooth ● Parallel (IEEE-1284, ...) ● Serial (RS-232/422/485, USB, ...) ● Graphics (2D, 3D, acceleration ...) ● Software ● Operating Systems ● Linux, Windows XP-Embedded or other ™ ● User software: Java Runtime Environment (JRE ), Java applications, Java Libraries, native apps 2007 JavaOneSM Conference | Session TS-2602 | 5 Embedded Processor Adoption Data from Java SE platform embedded Web site survey (1000 responses) CPU stats Apr ’06–Jan ’07 375 350 325 300 275 250 x86 225 PPC ARM 200 MIPS 175 XScale 150 125 100 75 50 25 0 Apr/ Jun Jul Aug Sep Oct Nov Dec Jan . ∑ May 2007 JavaOneSM Conference | Session TS-2602 | 6 Defining Target Device Requirements How much RAM do you need? ● Factors Impacting RAM consumption ● How many Java technology processes ● Complexity of Java application ● How much Java technology eap space ● How much Just-In-Time Compilation do you need for best performance ● Size of non-Java technology processes ● Which Operating System you choose Telco CSCF Server RFID Reader PDA (Call Session Single Func Dev Control Function) 2007 JavaOneSM Conference | Session TS-2602 | 7 Display Device Headless or Headfull? ● We Offer a Headless version of Java SE platform Embedded; Still full Java SE platform compatibility but... ● No mouse, keyboard input ● No window creation or display graphics ● Graphics APIs throws HeadlessException ™ ● Java 2D API graphics still fully functional for printing or off screen rendering ● Saves RAM and DISK space 2007 JavaOneSM Conference | Session TS-2602 | 8 Embedded Operating System Selection Sun Java Platform embedded survey data 5/06 to 2/07 4.3 9.1 XP XP-Em- bedded 3.1 WinCE 2.4 Linux Windows Windows vs. Linux Windows Breakdown 2007 JavaOneSM Conference | Session TS-2602 | 9 Agenda Define Your Target Device Requirements Which Java Platform Edition Is Right for You Selecting Support Libraries Developing Your Application Code Building Your Target Image Debugging Performance Tuning Q&A 2007 JavaOneSM Conference | Session TS-2602 | 10 Java 2 Platform, Standard Edition (J2SE™ Platform) 5.0 Rich set of APIs for embedded developers Java Language Java Language Development Tools and APIs java javac javadoc apt jar javap JPDA Other Trouble- Security Int'l RMI IDL Deploy Monitoring shooting JVM TI Deployment Technologies Deployment Java Web Start Java Plug-in User Interface Toolkits AWT Swing Java 2D™ Accessibility Drag'nDrop Input Methods Image I/O Print Service Sound Integration ™ ™ Libraries IDL JDBC JNDI RMI RMI-IIOP Other Base J2SE JDK JRE Beans Int'l Support I/ONew I/O JMX JNI Math Libraries API Std. Override Extension Networking Mechanism Security Serialization Mechanism XML JAXP Concurrency lang and util Lang and Util Collections JAR Logging Managment Base Libraries Utilities Regular Preferences Ref Objects Reflection Expressions Versioning Zip Java Virtual Java Hotspot™ Client Compiler Java Hotspot™ Server Compiler Machine Platforms Solaris™ Windows Linux Other 2007 JavaOneSM Conference | Session TS-2602 | 11 Java Standard Edition Platform for Embedded Selection guidelines Embedded Device Requirements Java SE platform compatibility? Java SE ? YES Platform for Require SE Packages? Embedded No—Both viable Multi-CPU, multi-core? ? YES Heavily multi-threaded? No—Both viable ? YES RAM > 32MB? No DISK or FLASH Storage > 32MB? ? YES Java 2 Platform, Micro No Edition (J2ME™ Platform) 2007 JavaOneSM Conference | Session TS-2602 | 12 Java SE Embedded Platforms Continually updating Small Full Release Platform Headless Footprint Featured Linux PowerPC Yes Yes Java SE Platform 1.4.2 Linux ARM (New) Yes Yes Linux x86 Yes Yes Yes Java SE Platform 5.0 Linux PowerPC Yes Yes Windows XP Embedded No Reduced Yes Java SE Linux x86 Yes Yes Yes Platform 6.0 Other combinations available by request 2007 JavaOneSM Conference | Session TS-2602 | 13 Agenda Define Your Target Device Requirements Which Java Platform Edition Is Right for You Selecting Support Libraries Developing Your Application Code Building Your Target Image Debugging Performance Tuning Q&A 2007 JavaOneSM Conference | Session TS-2602 | 14 Third Party Tools, Utilities, Libraries Abundant ● Main software sources: community development, collaboration/participation platforms, companies ● http://apache.org/ Apache ● http://sourceforge.net/ SourceForge ● http://freshmeat.net/ FreshMeat ● http://gnu.org/ GNU's Not Unix ● Companies providing free software or promoting free software development (Sun: http://java.net/) 2007 JavaOneSM Conference | Session TS-2602 | 15 Examples of Third-Party Middleware for Embedded Java Platform Peripheral I/O USB—JSR-80 Bluetooth—JSR-82 Comm—javax.comm Database Object Persistence Derby db4o HSQLDB Perst Application Web Server Framework—OSGi Jetty Equinox Apache ProSyst 2007 JavaOneSM Conference | Session TS-2602 | 16 Agenda Define Your Target Device Requirements Which Java Platform Edition Is Right for You Selecting Support Libraries Developing Your Application Code Building Your Target Image Debugging Performance Tuning Q&A 2007 JavaOneSM Conference | Session TS-2602 | 17 NetBeans™ Software ● Besides Java SE platform support, also support for: Java ME platform (Mobility pack), Java Platform, Enterprise Edition (Java EE platform) (Enterprise pack) ™ ™ ● Java EE platform: web apps [servlets, JavaServer Pages (JSP ) technology, Enterprise JavaBeans™ (EJB™) architecture], remote deployment ● Advanced, descriptor-based project management (XML descriptors): ● Development (editing, configuration, version control) ● Advanced editing: automatic code generation (RAD) for common design/implementation patterns, context-sensitive auto-completion, color-coding, etc. ● Building, bundling (e.g., using Apache ant tool) ● Deployment/installation (local, remote) 2007 JavaOneSM Conference | Session TS-2602 | 18 NetBeans 2007 JavaOneSM Conference | Session TS-2602 | 19 NetBeans Software ● Profiling (Including BCI: byte code instrumentation) http://profiler.netbeans.org/ ● Debugging (Java Platform Debugger Architecture product (JPDA) based) http://debugger.netbeans.org/ ● Database connectivity/interaction (JDBC software- based) http://db.netbeans.org/ ● GUI RAD: Project Matisse (Form-based: XML GUI descriptor) http://www.netbeans.org/kb/articles/matisse.html2007 JavaOneSM Conference | Session TS-2602 | 20 NetBeans 2007 JavaOneSM Conference | Session TS-2602 | 21 Use of Native Libraries ● Leverage legacy native code for embedded systems ● Retain value/benefits of, and previous investment in,existing native code, and gain benefits of Java platform ● Java technology provides interface for this: Java Native Interface (JNI™) API http://java.sun.com/j2se/1.5.0/docs/guide/jni/ http://java.sun.com/products/jdk/faq/jnifaq.html ● JNI API allows you to write “glue code” to bind/ link Java code to native code: Java code wrapper, Java API 2007 JavaOneSM Conference | Session TS-2602 | 22 Peripheral I/O Java device drivers Java device drivers implemented in 100% Pure Java Java device driver code—100% portable to other platforms for which a Java API/binding for the port I/O protocol is available Java API for port I/O One implementation per I/O protocol, Java J N I A P I reusable for multiple different devices Virtual Machine Implementation examples: (JVM™) native javax.comm . // library javax.usb O S Multiple types of devices can be connected to port, embedded system devic one at a time hardware e Each device type uses a port different Java device driver The terms “Java Virtual Machine” and “JVM” mean a Virtual Machine for the Java™ platform. 2007 JavaOneSM Conference | Session TS-2602 | 23 Use of Native Libraries ● Process of writing JNI API glue code can be largely automated—a.k.a. auto-wrapping/ binding: ● GlueGen: https://gluegen.dev.java.net/ ● SWIG: http://www.swig.org/ ● JANET: http://janet-project.sourceforge.net/ 2007 JavaOneSM Conference | Session TS-2602 | 24 Agenda Define Your Target Device Requirements Which Java Platform Edition Is Right for You Selecting Support Libraries Developing Your Application Code Building Your Target Image Debugging Performance Tuning Q&A 2007 JavaOneSM Conference | Session TS-2602 | 25 Adding Java Technology to Your Embedded OS ● Linux ● Embedded OS vendor specific ● ftp/nfs transfer to FLASH/DISK common ● Unzip/untar Java SE platform distribution ● Windows XP Embedded ● Microsoft provides Platform Builder GUI 2007 JavaOneSM Conference | Session TS-2602

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    46 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us