
Java in Embedded Linux Systems Java in Embedded Linux Systems Michael Opdenacker Free Electrons http://free-electrons.com/ Created with OpenOffice.org 2.0 Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 1 Rights to copy Attribution ± ShareAlike 2.0 © Copyright 2006-2004 You are free Michael Opdenacker to copy, distribute, display, and perform the work [email protected] to make derivative works to make commercial use of the work Document sources, updates and translations: Under the following conditions http://free-electrons.com/articles/java Attribution. You must give the original author credit. Corrections, suggestions, contributions and Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license translations are welcome! identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/2.0/legalcode Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 2 Best viewed with... This document is best viewed with a recent PDF reader or with OpenOffice.org itself! Take advantage of internal or external hyperlinks. So, don't hesitate to click on them! Find pages quickly thanks to automatic search Use thumbnails to navigate in the document in a quick way If you're reading a paper or HTML copy, you should get your copy in PDF or OpenOffice.org format on http://free-electrons.com/articles/java! Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 3 Contents Java history Java implementations Key concepts and features JVM implementations Issues with Java Java hardware Java©s strengths for acceleration and Linux embedded systems Conclusion Glossary Useful reading Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 4 Java history (1) 1991: Sun started working on a project to anticipate the next wave of computing: the convergence of digitally controlled consumer devices and computers. 1992: Implemented home entertainment control demos with a processor independent language: Oak. 1992-1994: focus moving from digital cable television network to the Internet as a way to publish and share content. 1994: Oak renamed as Java 1994: HotJava web browser with dynamic, executable content. 1995: First public release of Java. Great success Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 5 Java history (2) 1995: Netscape announced support for Java 1996: Java 1.0 release 1996: Microsoft takes a Java license 1997-2001: Sun sues Microsoft for trying violating its license and trying to enforce its own Java standard. 2001: Microsoft loses the right to advertise its products as ªJava Compatibleº. Microsoft©s licensed terminated but can continue to use its own implementations. 1998: Java 1.2. Renamed as ªJava 2º 2002: Java 1.4 Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 6 Java key concepts WORE Write Once, Run Everywhere Java applications are compiled in Java Virtual Machine (JVM) bytecode. Can be run on any platform with a JVM implementation. Java Java JVM Developer source code Compiler binary environment JVM JVM User binary Interpreter environment Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 7 Java features See http://java.sun.com/docs/overviews/java/java-overview-1.html for details Simple Portable Automatic garbage collection, small footprint No architecture dependent data sizes (int: 32 bit, float: 32 bit). Portable VM source C code. Object oriented For well defined, reusable sw components Interpreted On the fly conversion to native machine code Network-Savvy Support for network protocols (http, ftp...) High performance VM code designed for simple machine code Robust generation. Optimized bytecode generated by the No pointers, no memory corruption, true compiler. VM interpreter optimizations. arrays. Strict compile and run time checking. Multithreaded Secure Multithread support in the language itself. But Built for security in networking environments. Real-time performance limited by OS RT perf. Data protection (no pointers). Dynamic Architecture neutral Upgrading a class doesn©t force to recompile the Code runs anywhere a VM is available applications using it. Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 8 JNI: Java Native Interface Helps to understand how you can access the hardware with the JVM! The JNI lets code running on the JVM operate with applications and libraries written in other languages such as C, C++ or assembly. Needed to use system dependent routines handling hardware access. Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 9 Issues with Java Though sources are available, Java is not Open Source Must purchase support from Sun to access the Java Compatibility Kit, mandatory if you release a product with changes to the Java sources. Commercial applications must purchase a license for the Java Compatible logo. Limitations of the Write Once Run Everywhere paradigm: the availability of a JVM is not enough Also need the full set of JDK libraries Can©t run Sun©s JDK classes on any JVM: they assume that a bunch of native methods are implemented. These methods are undocumented! Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 10 Java©s strengths in embedded systems Hides the specificities of the device and the embedded OS Provides a number of features beyond those offered by the OS Allows to build network interoperable embedded systems, whatever their hardware architecture. Simplifies product development. The software can easily be developed on workstations in parallel with the hardware. Makes it possible to reuse code Easy integration of Java Code and native code Smaller applications footprint: more compact bytecode and higher level class availability. Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 11 Java products / Glossary See http://java.sun.com/products/ JDK: Java Development Kit JVM: Java Virtual Machine J2RE: Java2 Release Environment Everything needed to run Java applets and applications: JVM, classes... J2SE: Java 2 Standard Edition J2RE + development tools (JDK) J2EE: Java 2 Enterprise Edition Java tools for building enterprise-class server-side applications J2ME: Java 2 Micro Environment Highly optimized Java runtime environment and APIs for a wide range of consumer electronics products. Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 12 Java in Embedded Linux Systems Java implementations for Linux Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 13 Blackdown project http://www.blackdown.org/ Complete JDE and JRE releases for Linux Just ports Sun©s Java tools to Linux, entirely based on Sun sources (because of the license) Just distributes binaries, no source code. Did its own for several years, until Sun started supporting Linux and used their work Now works together with Sun (who granted a special noncommercial license) Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 14 Sun©s Java or Blackdown on Linux? Reasons for choosing Sun Java for Linux Sun Java on Linux is mostly based on Blackdown©s work Commercial support Supports only 32bit x86 and Sparc Linux Reasons for choosing Blackdown Java for Linux Vendor independent, non commercial, focusing only on technical issues No commercial support Available on other architectures (ARM, PowerPC, MIPS...) Provide additional packages for Java2: Java3D, Java Advanced Imaging, Java Media Framework (audio, video) Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 15 GNU and Java http://www.gnu.org/software/java/ 2 components: Java Compiler: gcj and libgcj GNU Classpath Java in Embedded Linux Systems © Copyright 2006-2004, Michael Opdenacker, Creative Commons Attribution-ShareAlike 2.0 license http://free-electrons.com Aug 9, 2006 16 GNU compiler for Java http://gcc.gnu.org/java/
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages30 Page
-
File Size-