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
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!
Lan,
Glad to hear it was helpful for you.
Jay
Is there any other way to due this? My server does not allow me to modify my .htaccess file
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
Hi, am using openSUSE. Where can I find the file .htaccess?
Simon,
You can create a new .htaccess file on a per-directory basis. (Unless your webhosting provider has disabled this ability.)
Jay
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