About MIME Types

JAR files that are enclosed in forms must have the MIME type set to:

The corresponding XFDL code will look like this:

   <mimetype>
      application/uwi-jar
   </mimetype>

If you are using the Designer to enclose a JAR file into a form the Designer will set the MIME type for you.

You can also override the default Java™ Virtual Machine (JVM) that is used to run the enclosed JAR file. To do this, you must add a vm parameter to your MIME type, as shown:

   <mimetype>
      application/uwi-jar; vm="<java virtual machine>"
   </mimetype>

Set this to the string that the JVM uses to register itself. For example,"Sun VM <version>". The version is guaranteed to include a major and minor number, and may include further information, such as a maintenance number, build number, and so on.

Since it can be difficult to get an exact match, you can use the * wildcard in the version string. For example, you might use the following string:

   Sun VM 1.4*

This will match any version beginning with 1.4, such as “1.4.2_03 JDK” or “1.4 JDK”.

When there are multiple matches, the API will default to the latest version. For example, if you search for version 1.4*, and you have “Sun VM 1.4 JDK” and “Sun VM 1.4.2_03 JDK” installed, the API will use version 1.4.2_03.

Additionally, the API always chooses the JDK over the JRE. For example, if you search for version 1.4*, and you have “Sun VM 1.4.2_03 JDK” and “Sun VM 1.4.2_03 JVM” installed, the API will use the JDK.