×

Discussion Board

Results 1 to 13 of 13

Thread: JAD and JAR

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    12

    Lightbulb JAD and JAR

    Hi all,
    I know that:
    jad - is just a text file with application parameters
    jar - archive with classes

    that means JAR can be installed to a mobile device .. so what about the JAD How can i install it and specially if i want to embed inside it a certificate???

    so please someone tell me the difference and where can I read about both...

    thank you

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: JAD and JAR

    May be this link is of some interest to you.
    http://www.onjava.com/pub/a/onjava/e..._3/index5.html

    Regards
    Gopal

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    12

    Re: JAD and JAR

    I am sorry but it didnt help that much, please I need someone to give me any information about the security
    Thanks in advance

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    6

    Re: JAD and JAR

    hi

    the jad security is only helpfull when the game is uploaded via web/wap otherwise it provide only the information in the jar file (jar size, Jar URL,MIDlet-Name,MIDlet-Vendor,MIDlet-Version etc.)

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    12

    Re: JAD and JAR

    Actually it is not for games but i made an application to access my contacts and it runs perfectly in the nokia emulator and it is installed sucessfully but it don't want to be opened on my mobile so i want to be sure that it is an certificate error or permissions or what??

  6. #6
    Super Contributor
    Join Date
    Mar 2006
    Location
    Phoenix, AZ. USA
    Posts
    556

    Re: JAD and JAR

    Dont understand exactly what you are trying to do. You want your app, to be only able to run on emulator, and not on real device?
    Jason Glass
    http://IChiBanComputers.Com

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: JAD and JAR

    Hi ehabsadany,

    It's not clear what you're looking for but it seems you have doubts related to security (MIDlet signing, etc). You should take a look at this document:

    MIDP 2.0: Tutorial On Signed MIDlets v1.1
    http://www.forum.nokia.com/info/sw.n..._1_en.pdf.html

    Try to detail what your problem is so that people here will be able to provide better answers to your questions.

    Hope it helps!

    BR

  8. #8
    Registered User
    Join Date
    Feb 2006
    Posts
    12

    Re: JAD and JAR

    My problem is i wrote a code to access my contacts, when i installed it on my mobile the application is not openning at all... while when I have tried to open my application on the emulator it worked.. so is the problem MIDlet signing ???

    Here is my code and it work succesfully on the emulator but it is installed in the mobile and it doesnt open at all ..
    ======Start of code======
    ContactList contacts = null;
    try {
    contacts = (ContactList) PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
    } catch (PIMException e) {
    // An error occurred
    return;
    }
    Contact contact = contacts.createContact();
    String[] addr = new String[contacts.stringArraySize(Contact.ADDR)];
    String[] name = new String[contacts.stringArraySize(Contact.NAME)];
    String[] tel = new String[contacts.stringArraySize(Contact.ADDR)];

    //if (contacts.isSupportedField(Contact.NAME, Contact.NAME_FORMATTED))
    //contact.addString(Contact.NAME_FORMATTED, PIMItem.ATTR_NONE, "Mr. John Q. Public, Esq.");

    name[Contact.NAME_FAMILY] = TFfName.getString();

    name[Contact.NAME_GIVEN] = TFlastName.getString();
    contact.addStringArray(Contact.NAME, PIMItem.ATTR_NONE, name);

    contact.addString(Contact.ORG, PIMItem.ATTR_NONE, TFcompany.getString());

    contact.addString(Contact.TEL, Contact.ATTR_HOME, TFtelephone.getString());
    contact.addString(Contact.TEL, Contact.ATTR_MOBILE, TFmobile.getString());
    contact.addString(Contact.TEL, Contact.ATTR_FAX, TFfax.getString());
    contact.addString(Contact.EMAIL, Contact.ATTR_HOME | Contact.ATTR_PREFERRED, TFemail.getString());


    contact.addDate(Contact.BIRTHDAY, PIMItem.ATTR_NONE, new Date().getTime());


    try {
    contact.commit();
    } catch (PIMException e) {
    // An error occured
    }

    try {
    contacts.close();
    } catch (PIMException e) {
    }

    =========end of code============
    Last edited by ehabsadany; 2006-03-28 at 10:57. Reason: add code

  9. #9
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    65

    Re: JAD and JAR

    hi
    A jad file cannot be installed on to the device
    JAD is an application descriptor, it will only give the details of the jar(application/game) to the device if installed thru OTA(downloaded thru GPRS).
    I don't think the problem with ur code is certificates or permissions.
    When the application starts up the device will pop up a window asking u to alllow the java appln to access the device contact list.

  10. #10
    Super Contributor
    Join Date
    Mar 2006
    Location
    Phoenix, AZ. USA
    Posts
    556

    Re: JAD and JAR

    it will prompt the user, unless, as I have found, if the offending api being called is located in startApp(), then it has no time to prompt user, and immediately exits the application

    are you doing anything such as accessing the PIM information and API's, directly from startApp() method?

    if yes, can you move the offending code, so at least your app will launch and stabilize?

    and also catch just a regular Exception, in case your not catching the exception being thrown, i.e. all I see you catching is "PIMException" dont the PIM api's also throw securityexception?
    Jason Glass
    http://IChiBanComputers.Com

  11. #11
    Registered User
    Join Date
    Feb 2006
    Posts
    12

    Re: JAD and JAR

    Hi
    my code is written when i press a command, and i cought every thing, so i dont know what is the problem..
    my application is working sucessfully in the emulator

  12. #12
    Super Contributor
    Join Date
    Mar 2006
    Location
    Phoenix, AZ. USA
    Posts
    556

    Re: JAD and JAR

    Does your code need to be run in a separate thread? or have you tried putting it in a separate thread.

    Are you sure device supports JSR-75 or something similar?

    You provided enough code, but if you want to provide a very short midlet that eroors as you say, I will try it on my 6630 for you
    Jason Glass
    http://IChiBanComputers.Com

  13. #13
    Registered User
    Join Date
    Nov 2003
    Posts
    31

    Re: JAD and JAR

    Does it fail during install or when you try running the application?
    Did you package you MIDlet (jar) before transferring it to the phone (Project+Create Package+Package)?

    Verify that your phone support the PIM API (JSR-75) as Jason also mentioned.
    It has nothing to do with signing the MIDlet.

Similar Threads

  1. jad and jar files
    By colaloca in forum Mobile Java General
    Replies: 12
    Last Post: 2004-12-13, 23:41
  2. Replies: 4
    Last Post: 2003-09-10, 18:25
  3. About JAD and JAR files
    By simpleisgood in forum General Messaging
    Replies: 2
    Last Post: 2003-07-29, 02:31
  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

Posting Permissions

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