public class MenuApplication extends java.lang.Object
MenuApplication is primarily for use with the Java Network Launching Protocol (JNLP) aka Web Start, but it can be used with any system that invokes applications via a menu choice such as the InstallAnywhere lax tool.
If MenuApplication detects that it was invoked from a menu, then it sets the current directory to the value of user's home directory so that when the user opens a file chooser to safe a file then the initial default directory is the user's home directory instead of the application directory
The security manager is set to null for two reasons:
Note that in Web Start 1.0.1, it is necessary to sign the application if it is to have access to the local disk etc. The way that this is handled is that the .jnlp file that defines the application is copied to the .jar file that defines the main() method for the application and the .jar file is signed. Unfortunately, this means that two Web Start applications cannot share one jar file, so we create wrappers that call the appropriate main method.
For more information about JNLP, see $PTII/mk/jnlp.in.
Each JNLP Application should extend MenuApplication and simply have its main() call this main(). The makefile will need to be extended to create a jar file that includes
|Constructor and Description|
|Modifier and Type||Method and Description|
Main method that sets user.dir as necessary.