Q: How can I develop a Java application for Nylux?
A: In order to develop a Java software for Nylux platform, we suggest as first thing to install on the pc an IDE (Integrated development environment, a software development system), such as Eclipse or Netbeans. Using one of that IDE, both develop and debug cycles will be faster and easier. You need to install on the development pc also a Java virtual machine, that will allow the source's compilantion and the project's execution on the development machine. On Windows hosts we suggest to use Oracle's jdk ver. 1.4 (similar to PhoneME jvm used by Nylux devices), while if using a Linux host we suggest to use directly the specific Linux release of the PhoneME virtual machine.
Independently by the virtual machine and the IDE used, it will be necessary to set up the compiler's “compliance level” or “source level” (in the used IDE) jdk ver. 1.3 or 1.4, and also to import in every new project's classpath every jar file needed (that depends by the project's dependencies, i.e. swt.jar, fake_nylux.jar).
Nylux website provide in the “Downloads -> SDK” section also the Java development kit, composed by the following files:
- nylux.jar: runtime package needed by Nylux applications that use the functionalities included in the java sdk (this file must be copied on Nylux device, and must be specified as part of the classpath in the Nylux program's startup command or script)
- fake_nylux.jar: development package that contains the nylux.jar mentioned above, but also the sdk javadoc and a fake package that can be used while developing a software (contains fake calls to Nylux system functionalities, so this file must be specified as part of the classpath while developing a project that use sdk, in order to enable the emulation of the typical Nylux peripherals, such as laser, led, buzzer, etc.).
- jni.tgz: Nylux installation package that contains native libraries and links needed by the applications that use java sdk. This package must be installed on every device that will run applications that use java sdk.
In the same website section are also provided severals files. Among these we remind as more used the followings:
- nyluxResources.jar: runtime package (including sources and documentation) that allow the use of a graphic component similar to the application bar.
- demoNylux.jar: example program that show how to use Java sdk (including sources).
NOTES:
- SDK libraries are not mandatory: are needed only if a software needs to manage the typical Nylux peripherals, such as battery, buzzer, keyboard, laser, led and network card.
-
In the same website section (Downloads -> SDK) are provided also two example programs including source code (sample_SWT_Nylux.zip and SQLite_sample.zip). We suggest to donload and look at them in order to understand the basics of a Nylux Java program and also have some program's startup command or script example.
