< Previous PageNext Page > Hide TOC

Keys and Values

MainClass

This is a required key. It designates the name of the class containing the application’s main method. If the classes are included in your application as a JAR file, you can use the com.companyname.classname addressing scheme to locate the main class within the JAR file.

JVMVersion

This key is recommended in any Info.plist file. It determines which version of Java the application is run with. Table 3-1 lists valid strings for the JVMVersion key along with a description of which version of Java is used. Without this key set, your application may not launch with the version of Java you intend—make sure to set it. With the Java 1.4.2 release, specifying a minor version of Java has been deprecated; instead use the asterisks (*) or plus (+) symbols with a major version. For example use 1.4+ instead of 1.4.2.

Note:  If you do not set the JVMVersion key in a double clickable application, it will run in Java 1.3.1.

Table 2-1  Values to specify the Java version in Mac OS X

String

Java version used

Notes

1.3.1

1.3.1

Specifies an exact version of Java. It is not recommended that you do not use this key unless absolutely necessary.

1.3*

1.3.1

Requests the highest version of Java 1.3 available. Note that if Java 1.3 is updated in future releases of Mac OS X, the latest version of Java 1.3 will be used.

1.3+

1.4.2

Requests the highest version of Java above 1.3. Note that if Java is updated in future releases of Mac OS X, the latest version of Java will be used.

1.4.1

1.4.2

If Java 1.4.2 is installed, Java 1.4.1 is no longer used. For compatibility, applications that specify 1.4.1 will run in Java 1.4.2. You should update these applications to specify 1.4* or 1.4+ as appropriate.

1.4*

1.4.2

Specifies the highest version of the Java 1.4 available. Note that if Java 1.4 is updated in future releases of Mac OS X, the latest version of Java 1.4 will be used.

1.4+

1.4.2

Specifies the highest version of Java above 1.4. Note that if Java is updated in future releases of Mac OS X, the latest version of Java will be used.

ClassPath

Allows you to explicitly set the path for required directories or JAR files. If you do not set this, the default class path is the root of the application bundle ($APP_PACKAGE).

WorkingDirectory

Allows you to modify the current working directory for the application from the default working directory at the root of the application bundle ($APP_PACKAGE).

Arguments

A string or array of strings where each string is a space-separated list of arguments to pass to main as String[] . This is useful if your application expects to receive arguments passed in from the command line.

Properties

Properties is a subdictionary of the Java dictionary. Valid keys for the Properties dictionary are system properties that you might pass into java from the command line with the -D flag. A list of valid properties is available in Java 1.4: Runtime System Properties.

Since the Properties key designates a dictionary, make sure to begin and end it with the dict keyword. Listing 1-1 shows an example of how to use the Properties dictionary.

VMOptions

Space-separated list of strings, or an array of strings where each string is an options for the Java virtual machine. For example:

<key>VMOptions</key>
<string>-Xms512m -Xmx1024m</string>

is equivalent to

<key>VMOptions</key>
<string>{"-Xms512m", "-Xmx1024m"}</string>


< Previous PageNext Page > Hide TOC


© 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-10-05)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.