Your SlideShare is downloading. ×
Jalimo Slides Linuxtag2007 (English)
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Jalimo Slides Linuxtag2007 (English)


Published on

Jalimo Slides Linuxtag2007

Jalimo Slides Linuxtag2007

Published in: Technology, News & Politics

  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Java-Linux-Mobile Platform
  • 2. Status
    • Increasing number of small mobile Linux devices
    • Java on mobile mobile and embedded devices
    • Classpath & friends are 'grown up'
    • Free java on Linux-embedded is rarely in use
  • 3. Java embedded?
    • What is Java?
      • J2ME CLDC
      • J2ME CDC
      • J2ME CDC + AGUI (JSR 209)
      • J2SE
    • Only certified platforms (JVMs+class libraries) are allowed to be named 'Java'.
    • The alternative, free JVMs are not certified
  • 4. Java and Java-like Implementations
    • Sun J2SE – (GPL and proprietary)
    • Sun J2ME PhoneME (GPL)
    • J2ME IBM J9 (proprietary)
    • Gnu Classpath (GPL) with different JVMs
      • cacaojvm (GPL)
      • jamvm (GPL)
      • kaffe (GPL)
      • ...
      • Aonix, Perc (proprietary)
      • Aicas, JamaicaVM (proprietary)
    • ...
        • Realtime capable
  • 5. As always - the GUI makes it!
    • Except J2ME CLDC everything is ~ Java 1.3.
    • Concise: The different GUI attempts.
      • MIDP 2.0 (minimal)
      • AWT (small amount of features)
      • Swing (problems in performance)
      • SWT (with GTK peer: many dependencies)
      • SWT (with QT peer: proprietary)
    • further possibilities
      • Java-gnome
      • escher (pure java X library)
      • jsdl (java sdl bindings)
  • 6. Pocket-Size Linux
    • Distributions
      • Familiar (OpenEmbedded, ipkg)
      • Ångström (OpenEmbedded, ipkg)
      • Maemo (Scratchbox, apt, dpkg)
      • OpenMoko (OpenEmbedded, ipkg)
    • Environments
      • Opie (Framebuffer/QT embedded)
      • GPE (Xserver/GTK)
      • Maemo (Xserver/GTK + Hildon + Osso)
      • OpenMoko (Xserver/GTK + libmokoui + libmokocore)
  • 7. Java @ Pocket-Size Linux
    • mostly sporadic:
      • e.g. jamvm and the old gnu classpath
      • seldomly updated
      • no concept for packaging and further integration
      • GUI: mostly AWT (with gtk peer)
    • OpenEmbedded: jamvm 1.4.2/classpath 0.90
    • Maemo:
      • jamvm 1.4.2/classpath 0.91 (without 'hildonizing')
      • sun PhoneME (as tar.gz, without gui)
      • JaLiMo
  • 8. Which problems exist?
    • at the Java-Porting
      • the Build Process is different, mostly
      • dependencies for the GUI
    • missing optimisation for the embedded area
      • size & modularization
      • startup-speed
    • in development
      • Embedded Java is different
      • missing integration in the environments
      • packaging + dependency management
      • missing dependencies and bindings
      • bad framework/toolchain support
  • 9. JaLiMo
    • JaLiMo is an initiative to build a complete free Java-Stack for mobile Linux devices.
    • the integration and completion of existing projects has the focus.
    "Java-like environment for mobile Linux devices" Main tasks are the problems after porting the JVM!
  • 10. JaLiMo - Who?
    • sponsored by the Tarent GmbH
      • Sebastian Mancke
      • Robert Schuster (Gnu Classpath)
      • Fabian Köster
    • Unterstützt durch
      • Christian Thalinger (
      • Roman Kennke (Gnu Classpath, escher)
      • Guillaume Legris (MIDPath)
      • Andrew Cowie (java-gnome)
      • ...
  • 11. JaLiMo - What? Integration Integration GUI Runtime Build Plattform CACAO JVM JamVM GNU Classpath phoneME MIDPath Swing/escher java-gnome SWT maven packaging plugin OpenEmbedded integration mvn2deb libjalimo-core libopenmoko libmaemo maemo ...?... openmoko
  • 12. Build Strategies - Cross Compiling
      • Cross Toolchain (gcc, ld, .. for arm)
      • Rootstrap
      • setting: PATH, CC, LD, AR, PKG_CONFIG_PATH
      • wrapper for: dpkg-architecture and pkg-config
    • Advantages:
      • the host tools (z.B. javac, javah, jar) are available.
      • useage in combination with dpkg-buildpackage
    • Problems:
      • keeping Rootstrap up to date
      • prone to errors by missing chroot
  • 13. Build Strategies - Scratchbox
      • an emulator based on Qemu
      • integrated with Toolchain and Rootstrap
    • Advantages:
      • direct copy of the target system
      • no more Cross Compiling
    • Problems:
      • no support of special Build Tools (z.B. javac, javah, ..)
      • Java binaries (e.g. jamvm or cacao) are not working in scratchbox
  • 14. Build Strategies - maven2
      • established Java Build environment
    • Advantages:
      • Management of dependencies
      • Standardized Build Process
      • Plugin Architekture
    • Disadvantages:
      • highly Java centred
      • bad support for JNI and Cross Compiling
      • no packaging conzept
  • 15. maven packaging plugin
    • Packaging
      • IzPack installer (for desktop)
      • .deb (for desktop and embedded)
      • .ipkg (planned)
    • generation of startscripts
    • orientation towards debian guidelines
    • conversion of the maven dependencies to debian dependencies
      • A maven plugin, developed by the tarent (Robert Schuster) to pack projects – released under (GPL).
  • 16. maven packaging plugin
    • Java package for maemo in 5 minutes!
    • .. writing of code and adaptation of pom.xml ..
    • .. and the .deb archive is complete!
    mvn archetype:create -DarchetypeGroupId=org.jalimo.archetype -DarchetypeArtifactId=gtkapp -DarchetypeVersion=0.1.0-SNAPSHOT -DremoteRepositories= -DgroupId=<your project group id> -DartifactId=<your artifact id> mvn -Dmaven.test.skip=true pkg:deb
  • 17. maven with JNI code
    • normal maven packaging project + makefile
    • Process: mvn pkg:deb
      • compiling of the Java classes
      • generation of the header files with javah
      • compiling of the C-code in scratchbox through /scratchbox/login <scriptfile>
      • collection of the binaries
      • generation of the .deb archives
      • Many projects are composed of java and C code
    } } }
    • Host
    • Host
    • Emulator
    example: java-gnome
  • 18. Java-gnome
    • Java-gnome a project, that already exists for 9 years
    • the 2 nd version has a quite high API-cover, but too many problems
    • since the last 1,5 years: rewrite java-gnome4
      • clean Design
      • lightweight
      • small API-cover
      • unfortunately just makes slow progress
    • But: a good concept
  • 19. Java-gnome - concept
    • Code Generation of the JNI layer
      • Object definitions are built from the GTK header files.
      • For each Gtk 'class' a C and Java file is generated that contains the whole JNI-code.
      • Java scopes of this layer are restricted to 'package'.
      • In a clean API layer the realization of the procedural code happens in a object-oriented API.
    • The GTK's pseudo-class structure is properly mapped in Java.
    • This way and the code generator are possibly suitable for other libraries: e. g. hildon or libopenmoko.
  • 20. Java-gnome
    • Why Java-gnome
      • high-performance, small
      • Possibility of smooth integration
      • support by Glade2 GUI Builder
      • simple, lovely API
  • 21. Java-gnome - coverage
    • very low in the upstream:
      • Window, Widget, Button, Label, Hbox, VBox
    • prototypical enhancements on two evenings:
      • Entry
      • TextView, TextBuffer
      • ToggleButton
      • CheckButton
      • ComboBox
      • MenuBar, Menu, MenuItem
        • ScrolledWindow
        • Frame
        • Notebook
        • HSeparator, VSeparator
        • Image
    Obviously: good concept!
  • 22. libmaemo
    • Enhancements of the java-gnome components with bindings to the Hildon framework. Necessary steps:
      • Wrapper for HildonWindow and HildonProgram (already existing)
      • Enhanced Widgets of the Hildon Frameworks
      • Bindings for Status Bar Plugins
    • Wrapper for the libosso
      • communication between applications
      • maybe possible with the existing project java-dbus
  • 23. MIDPath
    • MIDPath is a MIDP2 implementation based on MIDP
    • code of Sun's PhoneME.
    • On the opposite to PhoneME, MIDPath runs on Java SE as well as Java ME CLDC.
    • By that it can be used out of the box with Kaffe, Cacao, JamVM or other JVMs.
    • Guillaume Legris has written a GTK Backend for JaLiMo, that we were able to fit to the Maemo Input Framework.
  • 24. MIDPath - architekture
    • By different Backends, the MIDPath is quite portable.
    • For the use on small devices, there is an alternative using the Cacao CLDC Version.
    MIDPATH Java ME CLDC AWT SWT JavaSound SDL X11 ALSA Cacao JamVM Kaffe Cacao CLDC GNU Classpath JVMs Standard Libraries Backends Core GTK
  • 25. MIDPath - Status
    • Status:
      • quite stable
      • APIs: JSR-118 + FileConnection (JSR-75)
      • Missing: SSL, UDP, tone playing
      • OGG/MP3 support
    • Soon:
      • Audio streaming support
      • Midlet managment for Maemo
    • Future:
      • adding further Java ME JSRs
  • 26. Swing/Escher
    • Swing/AWT Support of GNU Classpath in maemo would require a higher gtk version.
    • Alternative
      • Pure Java X library: Escher
      • Classpath has different peers for AWT and Swing
    • Swing/Escher runs on maemo, but is still in progress:
      • problems with the handlig of windows
      • repainting
      • soft keyboard input
      • look and feel customizing
  • 27. Swing/Escher – Difficulty of Maemo Input
    • Soft Keyboard doesn't activate any X Key-Events
      • text oriented
      • undocumented Xmessages, that are realized over the Hildon/GTK Input Framework in GTK.
    • TODO:
      • Generation of XMessages on Softkeyboard (raise/lower)
      • Receiving of Messages, conversion in AWT Key Events
  • 28. lib-JaLiMo
    • the JaLiMo project ist still getting off the ground
    • completeness of a 1.0 is planned for the end of 2008
    • so far: focus on the basis platform
    • the main focus is on applikation framework
    Creation of mobile applications for the realization of end-to-end business processes.
  • 29. lib-JaLiMo concepts
    • Messaging
      • Asynchrone messaging as the application's basis
      • connection of different sources with connectors, e.g. SOAP/HTTP, XMPP, RMI, dbus
    application MessageBroker
  • 30. lib-JaLiMo concepts
    • Data-Binding
      • Bindung of data and view through messages to each other
      • declarative connection, without two-way referencing of the specific objects
      • offers stronger decoupling than MVC-paradigm
    • Action Framework
      • consequent use of the Command Pattern in GUI applications
      • All actions are definded as Action and can be used in different cases.
  • 31. lib-JaLiMo Konzepte
    • GUI Templating
      • Creation of parts of the GUI by using description languages, e.g.
        • HTML embedded in Swing
        • Glade für Java-Gnome
        • JSP oder Velocity für Web
      • Combination of GUI and application with actions and bindings
      • Aim:
        • easier re-use of applications in different contexts
        • rapid prototyping
        • division of designing and development
  • 32. JaLiMo - Robots
    • Why? To clarify how easy open standard components are for comlpex architectures.
    • autonomous Java controller
    • Java-gnome GUI
    • Asynchronous communication over XMPP
    • effort of the development
    • ~ 1 week
  • 33. Jazelle DBX (Direct Bytecode eXecution)
    • The N770 and the N800 have the proprietary Jazelle enhancement in their processor.
    • DBX is an additional instruction modus of the arm processor.
    • after a so called branch to java, the bytecode can be executed local.
    • 123 bytecodes are supported, directly. A software interrupt is activated for the rest.
    • Unfortunately Arm holds back the specification!!!
    Is it possible to use it, anyway?
  • 34.  
  • 35. Jazelle DBX (Direct Bytecode eXecution)
    • To change to the DBX-Modus seems to be no problem
    • Debugging with gdb shows, that the program always crashes after the last correct bytecode. All the earlier ones seem to be proceeded.
    • After one of the untreated bytecodes, the program counter is 0x11000. This seems to be the state after an interrupt.
    • Open questions:
      • Who has an interupt handler to look like?
      • How may parameters beeing passed and returned?
  • 36. JaLiMo Resources
    • Soon in addition:
      • Gforge infrastructure
      • open svn
      • Mailinglists
      • better management of individual projects
    • in other respects: [email_address]