Creating jar and jad files
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, February 14, 2002 03:47 AM

Can someone tell me exactly how do I create jar and jad files for my midlet. I created a jar file with the command jar cmf BatNavalManifest.txt BatNaval.jar preverified-temp* The file BatNavalManifest.txt contains the following: Manifest-Version: 1.0 MIDlet-Name: BatalhaNavalMidlet MIDlet-1: BatalhaNavalMidlet MIDlet-Version: 1.0 MIDlet-Vendor: Shortcut MicroEdition-Configuration: CLDC-1.0 MicroEdition-Profile: MIDP-1.0 The jad file is called BatNaval.jad and contains the following: MIDlet-1: BatalhaNavalMidlet MIDlet-Jar-Size: 38818 MIDlet-Jar-URL: BatNaval.jar    More>>

Can someone tell me exactly how do I create jar and jad files for my midlet.
I created a jar file with the command


jar cmf BatNavalManifest.txt BatNaval.jar preverified-temp*


The file BatNavalManifest.txt contains the following:



Manifest-Version: 1.0

MIDlet-Name: BatalhaNavalMidlet

MIDlet-1: BatalhaNavalMidlet

MIDlet-Version: 1.0

MIDlet-Vendor: Shortcut

MicroEdition-Configuration: CLDC-1.0

MicroEdition-Profile: MIDP-1.0



The jad file is called BatNaval.jad and contains the following:

MIDlet-1: BatalhaNavalMidlet

MIDlet-Jar-Size: 38818

MIDlet-Jar-URL: BatNaval.jar

MIDlet-Name: BatalhaNavalMidlet

MIDlet-Vendor: Shortcut

MIDlet-Version: 1.0



But when I try to run it, it gives a java/lang/NullPointerException


If I run it directly from the main class it runs ok.


Can anyone tell me what am I doing wrong?


Sónia    <<Less

Re: Creating jar and jad files

Posted By:   Liam_Quinn  
Posted On:   Thursday, February 14, 2002 10:04 AM

The MIDlet-1 attribute in your jad file is missing the class of the MIDlet. The attribute should look like this:



MIDlet-1: BatalhaNavalMidlet, foo.png, SomeClass


where SomeClass is the class that extends javax.microedition.midlet.MIDlet.

About | Sitemap | Contact