[Openjnlp-devel] OpenJNLP command-line launching
Brought to you by:
kherr
From: Kevin H. <ke...@na...> - 2002-03-26 22:00:52
|
I have implemented the launching properties thing inside the openjnlp-lib.jar as was previously discussed and added Gestalt.platformKey() to get a short string for each platform for creating properties like "launch.<key>.cmd=/usr/bin/java" where <key> is a key string returned by Gestalt.platformKey(). There needs to be a consensus on command-line operation, since we all have ideas on what we would like. I'll throw my world-view out to get the ball rolling on a discussion. org.nanode.app.OpenJNLP is the entry point for the platform-integrated application org.nanode.jnlp.JNLPParser is the entry point for JNLP parsing/caching/launching When external launching occurs, org.nanode.launcher.Launcher will invoke (by default) org.nanode.jnlp.JNLPParser with appropriate switches. I feel really good about the OpenJNLP-lib behavior, but I'm not quite sure about the application part. Until OpenJNLP gets to a point of handling JNLP files for web browsers I don't know if all the issues are clear. With no further ado, here's my first at some actual documented behavior... Proposed OpenJNLP-lib Behavior ------------------------------ org.nanode.jnlp.JNLPParser can be considered as the "OpenJNLP engine", allowing full control of the launching process. It will not do anything special other than perform whatever mechanical tasks specified. Arguments passed on command line after options will be treated as URLs to launch. If multiple URLs are specified and external launching is specified, each URL will be launched in a separate JVM. If internal launching is specified, all URLs will be launched in the current JVM. Default launching behavior changes from launching internally to launching externally. This means org.nanode.launcher.Launcher be updated to reflect this. All "-extXXX" args have platform-specific defaults defined in "/lib/launcher.properties" inside the openjnlp.jar. My idea of the current options are: -version show version of openjnlp-lib -internal launch within current JVM (external JVM launch is default behavior) -extclasspath <classpath to use when externally launching> -extcmd <command to invoke when externally launching> -extmain <main class name to invoke when externally launching> Proposed OpenJNLP Application Behavior -------------------------------------- org.nanode.app.OpenJNLP invokes the OpenJNLP application, which is defined as the user-friendly front-end to the OpenJNLP engine. It has two important jobs: to provide a good user experience (GUI or CLI) and to interface with the operating system. The behavior of operating systems dictates that arguments on the command line must be treated as local files. If OpenJNLP is invoked with no arguments, it will assume the GUI should be invoked (interactive mode). If arguments are specified, it should run in "non-interactive" mode. The exact behavior of this mode is not quite clear in my mind at this stage. All launching is done as external launching. An option can be set indicating the arguments should be treated as URLs instead. Another option will suppress the GUI. My idea of options: -version show version of openjnlp -gui force GUI to come up regardless of arguments -nogui never bring up gui regardless of arguments -urls treat arguments as URLs instead of files |