MIME Types for hosting J2ME .jar and .jad files

If you want a mobile phone to be able to download and install a java application (.jad/.jar file) from your website, you need to set up the correct MIME types for .jar and .jad files if they have not been set up by your webhost.

With apache, you can usually do this on a per-directory basis by adding the following lines to your .htaccess file:

addtype text/vnd.sun.j2me.app-descriptor jad
addtype application/java-archive jar

Related posts:

  1. Best J2ME mobile applications
  2. Hacking the LG CU-500 with BitPim
  3. Fixing Java in the Razr V3xx (Cingular)

7 comments ↓

#1 lan on 02.04.09 at 2:23 am

It was returning text mime type for the .jars so that the phone didn’t recognize the file. Just made these corrections to the .htaccess and it ok now!

#2 Jay on 02.04.09 at 9:37 am

Lan,
Glad to hear it was helpful for you.
Jay

#3 Brian on 02.21.09 at 11:02 pm

Is there any other way to due this? My server does not allow me to modify my .htaccess file

#4 Jay on 02.22.09 at 8:17 am

Brian,
Sorry, you’ll have to get your website admin to set this up in the global mime types configuration then. (Or switch to a better webhost.)
Jay

#5 Simon on 08.10.09 at 1:40 pm

Hi, am using openSUSE. Where can I find the file .htaccess?

#6 Jay on 08.10.09 at 5:16 pm

Simon,

You can create a new .htaccess file on a per-directory basis. (Unless your webhosting provider has disabled this ability.)
Jay

#7 Karsten on 08.29.09 at 10:28 am

There is an online tool that checks the jad file for common errors and also checks for the right mime type.
You can put in the url of the jad-file, and it fetches it and analyses it.
You find it here:
http://jadcheck.appspot.com

Leave a Comment