Skip to main content

installing java applications on the mobile phone

7 replies [Last post]
michaeln
Offline
Joined: 2007-09-14
Points: 0

Hy, my question could sound quite silly to you, but I need to ask this:
If I want to install an application on my mobile phone then I need to transfer the jar / jad file to my phone's memory. Are both required or could I transfer only one of them ? And the most impotant question is: do I have to do anything else in order to get that application to function ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Christophe Planty

"Why would I want to run MIDlets on my computer ?"

Because the emulator will provide you more information on the error, System.out & System.err can be seen in console (when you launch emulator.exe manually).

I strongly encourage you to first test on the emulator, then once the MIDlet works on the emulator, you can start testing your app in the handset.

Provisioning MIDlets trough cable or Bluetooth is not always supported,
(I can't tell for z400, but many devices only recognize jar)
The only reliable method I know is OTA download trough browser. (on a wap page).

http://developers.sun.com/mobility/midp/articles/ota/

Note that the article proposes the full jar URL into jad parameter :
MIDlet-Jar-URL: http://www.j2medeveloper.com:80/ota/demos.jar

But if jad/jar are deployed in the same path, you can deploy the jad at this URL : http://host/ota/demos.jad

Then provide only local path to the jar :
MIDlet-Jar-URL: demos.jar
( instead of MIDlet-Jar-URL: http://host/ota/demos.jar )

This local reference from jad to jar works on the Samsung z series.
(tested z340,z360,z400)

This could have the advantage to allow installing MIDlet from the jad locally.
But this will have the counter effect to not working anymore with windows mobile phones, which only deal with a full URL in jad parameter.

/Chris

-----Message d'origine-----
De : A mailing list for KVM discussion [mailto:KVM-INTEREST@JAVA.SUN.COM] De la part de meinterest@MOBILEANDEMBEDDED.ORG
Envoyé : lundi 17 septembre 2007 14:46
À : KVM-INTEREST@JAVA.SUN.COM
Objet : Re: installing java applications on the mobile phone

Hi,
Thank you for your answer.
I've read about making the jar file (inclusive the manifest.mf) and the jad file. But when I transfered the 2 files (like ordinary files, via USB cable) they didn't work. When I tried to open the .jad file it told me "Unrecognized filetype" and when I tried to open the .jar file nothing hapened. I have a Samsung Z400. Those tutorials I've read test their MIDlets on a mobile emulator (on the PC). Why would I want to run MIDlets on my computer ? Of course, I want to install them on the phone. That's their purpose and I should benefit from the Java feature of my phone. That's my opinion.
Thank you again and I will post my question on the category of the forum that you indicated to me.
[Message sent by forum member 'michaeln' (michaeln)]

http://forums.java.net/jive/thread.jspa?messageID=235617

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

michaeln
Offline
Joined: 2007-09-14
Points: 0

"Because the emulator will provide you more information on the error, System.out & System.err can be seen in console (when you launch emulator.exe manually). "
That's right, but I was refering to the final goal of creating a MIDlet.

I can't use the OTA method because I haven't enabled connections on my phone. I simply want to create a MIDlet and then install it.

As I said in my previos topic, I transfered in the same folder a .jar file and a .jad file. But I didn't get an application-specific behavior. When I tried to open the .jad file it told me "unrecognized filetype" and when I tried to open the .jar nothing hapened.

Message was edited by: michaeln

Ian Strain

if your phone is a Samsung then the only possible way to install an
application on the phone is via OTA.

meinterest@MOBILEANDEMBEDDED.ORG wrote:
> "Because the emulator will provide you more information on the error, System.out & System.err can be seen in console (when you launch emulator.exe manually). "
> That's right, but I was refering to the final goal of creating a MIDlet.
>
> I can't use the OTA method because I haven't enabled connections on my phone. I simply want to create a MIDlet and then install it.
>
> As I said in my previos topic, I transfered in the same folder a .jar file and a .jad file. But I didn't get am application-specific behavior. When I tried to open the .jad file it told me "unrecognized filetype" and when I tried to open the .jar nothing hapened.
> [Message sent by forum member 'michaeln' (michaeln)]
>
> http://forums.java.net/jive/thread.jspa?messageID=235691
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

michaeln
Offline
Joined: 2007-09-14
Points: 0

ok, thank you !

terrencebarr
Offline
Joined: 2004-03-04
Points: 0

Hi,

Sorry nobody has gotten back to you yet but this question was posted only recently and please realize these forums are monitored and answered as a "best effort".

When you say application I assume you mean "MIDlet". A correct jar file contains everything needed for an application. The jad file is used for install purposes, for example for over-the-air (OTA) installation (first the jad file is loaded, the information is processed, then the jar file is loaded and installed).

Depending on the phone model it may be possible to install an appliction file via USB or bluetooth directly on the phone. In such cases only the jar file (assuming it contains a complete and correct MANIFEST file) may be enough since the installer doesn't need any information from the jad file.

Hope this helps. PS: For future reference you should post new questions to the ME Application Developer Interest forum (http://forums.java.net/jive/forum.jspa?forumID=111) as that forum is geared specifically towards application development questions.

-- Terrence

Terrence Barr
Evangelist, Java Mobile & Embedded Community
Sun Microsystems, Germany
www.mobileandembedded.org

michaeln
Offline
Joined: 2007-09-14
Points: 0

Hi,
Thank you for your answer.
I've read about making the jar file (inclusive the manifest.mf) and the jad file. But when I transfered the 2 files (like ordinary files, via USB cable) they didn't work. When I tried to open the .jad file it told me "Unrecognized filetype" and when I tried to open the .jar file nothing hapened. I have a Samsung Z400. Those tutorials I've read test their MIDlets on a mobile emulator (on the PC). Why would I want to run MIDlets on my computer ? Of course, I want to install them on the phone. That's their purpose and I should benefit from the Java feature of my phone. That's my opinion.
Thank you again and I will post my question on the category of the forum that you indicated to me.

michaeln
Offline
Joined: 2007-09-14
Points: 0

Yap, I found out that there are no aswers at this question, even if it seemed to me quite easy to answer at the begining. But it's strange that nobody knows to answer this question, though it' s a MOBILE & EMBEDDED forum.