Java
From Moto4Lin
Uploading Java to Motorola Phone
moto4lin currently supports uploading java files, but involves some hacking of /a/mobile/kjava/J2MEST. This is unsafe, because there is not any documentation about the file's format.
On some phones with memory cards, such as the V360, you can just copy jar files to the kjava directory of the memory card, then choose "Install New" from the Games & Apps menu on the phone. Before doing so, you may need to hit the middle menu key and "Switch Storage Device" to the memory card.
It's also possible to upload Java using the Java application loader. There are a couple of command-line programs to do this, midletload (dion: I'm not the author. I have just modified it to compile without errors and move AT Vendor and PRODUCT to top of source) and linjal. Midletload uses USB, while linjal makes use of the cdc-acm kernel module (linjal also works on OS X). The following directions are for midletload (steps 1 and 3 are common to both, of course).
1. Enable Java app loader in phone: Change in SEEM 0032_0001, offset 43 (hex), bit 0. Change value of this bit to "1". After this reboot phone
2. Fix in main.cpp of program two lines to correct AT vendor and Product ID (default value is ok for C380/C650, E398 and some other phones):
#define AT_VENDOR 0x22b8 #define AT_PRODUCT 0x4902
3. In phone press Menu -> Settings -> Java Settings -> Java App Loader. After this plug in cable. (If cable was plugged before, just unplug it and then plug in again.
4. Unload cdc-acm kernel module (rmmod cdc-acm).
5. Run midletload (JAR and JAD files should be in current directory:
./midletload test.jad
Press Ctrl+C after finishing upload.
--dion 14:35, 7 May 2006 (PDT) (edited by ivanm, 7 Aug 2006)
