View Single Post
Posts: 309 | Thanked: 456 times | Joined on Jan 2010
#10
I've been asked to try and get a jar file working.
This method might work for other jar files for testing.. no guarantees since this just my own guessworkl

The command line for this is not as straightforward to get working, but reading the .sh files bundled with this it loads the modules before calling jar, then loads the main class.

The main class is named in the jar file.. this can be found by opening the jar file with a zip program.
Open 'META-MF/MANIFEST.MF' with a text editor
The file will look something like this:
Code:
Manifest-Version: 1.0
MIDlet-Vendor: Banka Koper
MIDlet-Version: 1.0.5
MIDlet-1: BankaIN,/icon_small.png,si.semantika.bkotp.j2me.BankaIn
MicroEdition-Configuration: CLDC-1.1
MIDlet-Name: BankaIN
MicroEdition-Profile: MIDP-2.0
The Midlet-1 line shows the icon used BankaIN,/icon_small.png, then a comma to separate the main class.. in this case si.semantika.bkotp.j2me.BankaIn
If you navigagte the file using a zip program you will find a file structure similar to this.

To get it working I edited the .sh file and saved a copy:
Code:
#!/bin/sh

$PWD/bin/cvm -Xmx12m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path=$PWD/midp/midp_linux_fb_gcc -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -suitepath /home/user/MyDocs/bankain.jar -1 si.semantika.bkotp.j2me.BankaIn2
If there are problems or errors with the midlet once launched will apper in the xterm. Should be able to close it using ctrl+c
Attached Images
 

Last edited by [DarkGUNMAN]; 2012-01-30 at 07:48.
 

The Following 6 Users Say Thank You to [DarkGUNMAN] For This Useful Post: