Java: Difference between revisions
Thebohemian (talk | contribs) |
Thebohemian (talk | contribs) |
||
Line 23: | Line 23: | ||
==Bootstrap process== | ==Bootstrap process== | ||
As told in the toolchain support section the whole Java support in OpenEmbedded is self-hosting. This mean you do not need to have any bit of Java on your build machine as OpenEmbedded will build this itself. | |||
This bootstrap process contains the following steps: At first jikes-native is compiled which is a Java 1.4-capable compiler that does not need a runtime or (strictly) a class library to work. With this compiler we compile the initial runtime (package virtual/java-initial). | |||
virtual/java-initial is a preliminary runtime. This virtual package is currently provided by cacao-initial or jamvm-initial. After that ecj-initial is build. At that point we have a 1.5-capable compiler running on a Java 1.4 compatible VM. | |||
The compiler is then used to build virtual/java-native and finally virtual/javac-native. The former virtual package is provided by either cacao-native or jamvm-native. The latter package is currently only provided through ecj-bootstrap-native. Having built these packages provides the OpenEmbedded build environment with a Java5-capable compiler and runtime. At that point we are ready to compile every other Java package. | |||
==Bootstrap virtual machine== | ==Bootstrap virtual machine== | ||
[[Category:FAQ]] | [[Category:FAQ]] |
Revision as of 10:16, 22 July 2008
This page is here to answer all things Java related to OpenEmbedded.
State of support
Virtual machine and class library
Currently (July 2008) you will be able to build packages for your target system that use either JamVM or Cacao as the virtual machine and GNU Classpath as the class library.
Support for PhoneME Advanced (CDC) and OpenJDK (with Cacao as the runtime) is planned.
Java libraries
The number of available Java libraries is still small but can grow quickly as the necessary infrastructure is in place. Currently libraries such as dbus-java, kxml2, libmatthew, librxtx, sqlitejdbc, java-sqlite, woodstox, xmlpull, SWT (3.4, Gtk+) are available.
J2ME MIDP2.0
J2ME MIDP2.0 is supported through the MIDPath project. MIDPath provides the neccessary libraries (taken from PhoneME and/or the respective JSRs) and OpenEmbedded has direct support for a few devices (e.g. button mappings). Please note that while MIDPath can run most MIDP2.0 programs it is no official MIDP2.0 implementation.
Toolchain
In order to build Java packages no virtual machine needs to be installed on the build machine. OpenEmbedded builds everything on its own.
Missing but planned to be included are popular Java build tools like Ant.
Configuring
In this section you learn about the things you can set up. In many OpenEmbedded-based distributions some or most of these decision may have already been made for you so there is no need to specify them. However in case you want to provide the Java support in your distribution you need to know which knobs are available.
Bootstrap process
As told in the toolchain support section the whole Java support in OpenEmbedded is self-hosting. This mean you do not need to have any bit of Java on your build machine as OpenEmbedded will build this itself.
This bootstrap process contains the following steps: At first jikes-native is compiled which is a Java 1.4-capable compiler that does not need a runtime or (strictly) a class library to work. With this compiler we compile the initial runtime (package virtual/java-initial).
virtual/java-initial is a preliminary runtime. This virtual package is currently provided by cacao-initial or jamvm-initial. After that ecj-initial is build. At that point we have a 1.5-capable compiler running on a Java 1.4 compatible VM.
The compiler is then used to build virtual/java-native and finally virtual/javac-native. The former virtual package is provided by either cacao-native or jamvm-native. The latter package is currently only provided through ecj-bootstrap-native. Having built these packages provides the OpenEmbedded build environment with a Java5-capable compiler and runtime. At that point we are ready to compile every other Java package.