To make J2ME Apps or maybe games, you will need to install OpenJDK (done via `apt install openjdk-xx` xx is the version number), Download the CLDC&MIDP jar files (download them from jarcasting).
Create a new java file for the main program, called HelloMIDlet.java:
Save it, then compile:
`javac -source 8 -target 8 -bootclasspath "cldcapi11-2.0.3.jar:midpapi20-2.0.4.jar" -d classes *.java`
Create the manifest file manifest.txt contains:
```
MIDlet-Name: MyAwesomeApp
MIDlet-Version: 1.0
MIDlet-Vendor: MyCompany
MIDlet-1: MyApp, /icon.png, HelloMIDlet
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
```
Package the classes and manifest and any additional files:
`jar cvm manifest.txt -C ./classes . > myapp.jar`
Install the packaged jar using the J2ME Emulator.
Komentar
Posting Komentar