Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2005

    Uploading JAR file into sun Application server


    How to upload the JAR file into Sun Aplication server and how to download the same file in Nokia60 series Emulator.....

    Guide me any one........


  2. #2
    Registered User
    Join Date
    Dec 2005

    Re: Uploading JAR file into sun Application server


    Your question is too broad but if i got it right you want to make your app available to your emulator. In summary, you'll need to configure your web server to recognize the MIME types text/vnd.sun.j2me.app-descriptor jad and application/java-archive jar and deploy the JAR and JAD inside the server public directories. If you really want to to "upload", you'll need to provide an upload page and have the web server permissions configured to allow that (check Sun's documentation for your server).

    Also, take a look at this article - http://today.java.net/lpt/a/165

    Below is an text excerpt:

    To be able to deploy your MIDlet via the Internet, you need to have access to a web server with a real-world IP address or domain name. You also need to have administrative privileges to be able to modify the configuration files of your web server to add some Multipurpose Internet Mail Exchange (MIME) types for the JAD and JAR extensions. If you are using Jakarta/Tomcat as your web server, you don't need to do this, as it already has these MIME types. For the Apache web server, modify the mime.types file and add the following extension types.

    text/vnd.sun.j2me.app-descriptor jad

    application/java-archive jar

    By adding these MIME types, you are informing the browser, or any client accessing these files from the server, how to handle these files when they are downloaded into the device.

    Next, create an HTML file that will become the point of reference. Strictly, this is not necessary, because a device that can access an HTML page can also access a JAD file. But an HTML page provides a point of reference, and therefore, let's create one for your Date-Time MIDlet. The HTML doesn't need to be anything fancy. Don't forget that users will be accessing this page via a mobile device, so it is prudent to keep the size of this page to the minimum. This is shown in Listing 2.

    Click <a href="DateTimeApp.jad">here</a> to download DateTimeApp MIDlet!

    Listing 2. DateTimeApp.html page for accessing the DateTimeApp MIDlet

    The page provides a link to the JAD file, and the JAD file provides a link to the associated JAR file via the MIDlet-Jar-URL: DateTimeApp.jar attribute. However, since this is now going to be accessed via a web server over the Internet, it is advisable to make this link absolute instead of relative. (The behavior of relative URLs is inconsistent as far as MIDlet access is concerned.) Since I am going to serve this MIDlet via a web site (Craftbits.com) I manage, I have modified this link to an absolute URL using this web site.

    MIDlet-Jar-URL: http://www.craftbits.com/j2me/DateTimeApp.jar

    You will, of course, need to change this URL to your own domain.

    Finally, upload the modified JAD file, the newly created HTML file, and the original JAR file to your web server to a directory location where you will be able to navigate to the HTML page via your mobile device browser. Now, anyone with a mobile device that can browse the Internet should be able to point to your DateTimeApp.html file and download, install, and run the DateTimeApp MIDlet.


    Take a look at this article:
    Juarez Alvares Barbosa Junior - Brazil

Similar Threads

  1. Start Midlet from other JAR file
    By heuven in forum Mobile Java General
    Replies: 1
    Last Post: 2005-07-27, 13:26
  2. Replies: 1
    Last Post: 2005-05-26, 14:22
  3. Replies: 0
    Last Post: 2002-06-10, 12:24
  4. How to Access 9210 Dbms file from my desktop application?
    By Nokia_Archive in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2002-06-03, 03:46

Posting Permissions

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