One of the core requirements for embedded Java applications is the ability to access I/O devices, such as sensors, switches, converters, actuators, LEDs, and so on to enable the embedded system to interact with the world around it.
Java ME Embedded includes the Device Access API (DAAPI), which is a comprehensive API that provides access to a range of common I/O devices directly from your Java application in an easy and platform-independent manner. No native code, recompilation, or other “traditional embedded trickery” required.
That works great if you have your target platform already available and up-and-running. But what if you want to start software development before your target platform hardware is available? Or you want to develop most of the code on a Desktop PC for convenience and speed purposes? The Java ME SDK has you covered.
The Java ME SDK offers a set of tools as well as plugins for NetBeans and Eclipse which allow you to develop Java ME Embedded applications efficiently and leveraging your existing Java expertise. Another great feature is that it includes a full emulation runtime which emulates a Java ME Embedded target platform on the PC. Furthermore, the Java ME SDK also includes a tool called the “Custom Device Editor”, which allows you to customize the emulation runtime to your needs (for example, by adding the specific I/O devices of your actual target hardware) and even allows you to implement simulated device behavior (in Java, of course).
To get started with custom I/O devices in the Java ME SDK, check out an excellent blog post Tom McGinn from the Oracle Education Team, explaining how to add and simulate an I2C temperature sensor.