Over The Air Provisioning and MIME types

Often, you'll deploy a on a web server, and it'll be accessible to phones through "over-the-air" (OTA) provisioning. To do this correctly requires the correct mime types for both .jad and .jar files. Below is a sample .htacess file for reference.

AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/java-archive jar
addtype text/vnd.wap.wml wml
addtype application/vnd.wap.wmlc wmlc
addtype text/vnd.wap.wmlscript wmls
addtype application/vnd.wap.wmlscriptc wmlsc
addtype image/vnd.wap.wbmp wbmp

During development, you're going to want to take advantage of the plugin and toolkit's ability to generate your MIDlet-Jar-URL for you. However, the plugin generates a relative URL, which won't work as the specification for a .JAD is an absolute URL.

Simply add the properties you want to appear in the .JAD by adding elements to the jadAttributes section of the configuration section of the plugin, in the .pom.

  <MIDlet-Jar-URL>http://codecafe.dev-hda.com/apps/jargoneer/codecafe-samples-2.0.1-SNAPSHOT-me.jar</MIDlet-Jar-URL>