×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    How to programmatically create a jad

    I have created a j2me application for a Nokia 6212 phone, my application requires a unique identifier to be send to a server.
    My application needs signing to allow the application unrestricted access to the network, without requesting the user approval every time.

    My questions are:

    1. Is there a script(php or c#) to programmatically create a jad file.
    2. Is it possible to put a unique identifier into a jad.
    3. will it be a problem that the jad contains a certificate, i don't know if you can copy a certificate from a jad file without compromising the jar that was signed.

    I plan to distribute the application through OTA.

    can some one please help me with these questions

    easylogic

    Ps: sorry for my bad English

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to programmatically create a jad

    A JAD file is just a text file. If you're downloading by HTTP, point the browser at a script (perl, php, whatever) instead of a JAD file. For example:

    Code:
    #!/usr/bin/perl
    
    my $time = time;
    
    print <<EOF;
    Content-type: text/vnd.sun.j2me.app-descriptor; charset=UTF-8
    
    MIDlet-1: MyApplication, /res/icon.png, MainClass
    MIDlet-Name: MyApplication
    MIDlet-Version: 0.1.0
    MIDlet-Vendor: grahamh
    MIDlet-Jar-URL: MyApplication.jar
    MIDlet-Jar-Size: 12468
    MyApplication-Installed-At: $time
    
    EOF
    It is essential that you set the content-type correctly, so that the device's browser will recognize the stream as a JAD.

    Signing is not a problem, since the signature protects only the JAR, not the JAD. The JAD can be changed without invalidating the signature. However: for signed applications, any attribute that appears in both the JAD and the MANIFEST (in the JAR) must have the same value. The JAD is not permitted to "override" a MANIFEST value (whereas it can for unsigned apps).

    Graham.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    5

    Re: How to programmatically create a jad

    thank you for your quick reply grahamhughes,

    Do i also need to put the certificate signature into the jad file when I want to create it through script. or is the signature already stored in de MANIFEST file.

    thanks, you already helped me allot,

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to programmatically create a jad

    Signing a MIDP application is different from signing a J2SE application. For MIDP, the signature is only stored in the JAD, it is not stored in the JAR.

    Graham.

Similar Threads

  1. [moved] How to create sis file which only contaians jad file
    By amit.mangal in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2009-11-06, 12:16
  2. link to jad in SMS
    By vsmouli in forum General Messaging
    Replies: 3
    Last Post: 2003-11-05, 09:41
  3. How to create JAR and JAD files
    By salmira in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2003-08-18, 08:50
  4. How can I transform java into jar files and create jad files?
    By unimog14 in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-02, 08:26
  5. 7650 JAD install Problems (V2.12 and V3.12)
    By piercer in forum Mobile Java General
    Replies: 1
    Last Post: 2002-08-18, 06:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×