| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Mar 13, 2006, at 2:56 PM, Steve Roy wrote:
-- Safari doesn't know anything about the details of JNLP files, other than the fact that they are considered safe for opening after download. LaunchServices knows that jnlp files are handled by Java Web Start.app (since its Info.plist claims that file type), so it launches the application and is sent an 'open document' event. Java Web Start then routes the file it was given through some native code given to us by Sun that does some basic parsing of the JNLP file. Web Start evaluates which version of Java will run the application, finds the 'safe' JVM parameters, 'safe' properties, and classpath for that version of Java, and then starts up the JVM, downloads the resources and runs your application. -- When you install a release of Java 5, Java Cache Viewer.app also registers that it can open JNLP files, and since it is newer than Web Start, it becomes the default application owner for JNLP files. (This is a feature of LaunchServices.) It does the same things as Java Web Start.app, except that it is aware of the VM ordering shown by Java Preferences.app, and uses that to determine which VM will be used if the JNLP file specifies '+' for the version. Currently, 1.4+ gives you 1.4.2, unless you put 1.5.0 at the head of the list. In Java 5 Release 4, 1.4+ will give you 1.5.0, unless you change it back to 1.4.2 yourself. It also knows where to find the right JAR files for JNLP processing, so it can construct the classpath needed to launch the application specified in the JNLP file with either 1.4.2 or 1.5.0. -- Out of the Tiger box, javaws is a symlink to /Applications/Utilities/Java/Java Web Start.app/Contents/MacOS/Java WebStart. When you installed a release of Java 5.0, the symlink is overwritten to point to /Applications/Utilities/Java/J2SE 5.0/Java Cache Viewer.app/Contents/MacOS/Java Cache Viewer. What all of this means is that 'javaws filename' is effectively the same as dragging the JNLP file on top of the JNLP opener (Java Web Start or Java Cache Viewer). The actual application used depends on whether or not you installed Java 5. -- In a perfect world, we would have deleted Java Web Start.app when Java 5 gets installed, but due to a bad architecture decision, that would have rendered Web Start apps using 1.4 useless. Once you install Java 5, do your best to ignore the fact that Java Web Start.app is still there. (I plan to fix that in an upcoming release.) -- In your first question, you asked about using javaws when passing an http URL -- 'javaws http://path/to/our.jnlp'. In this case, the native code that I mentioned earlier is not smart enough to download the file and determine the JVM that the JNLP descriptor wants. The Java portion of Java Web Start/Cache Viewer does that, so all the native code can do is use the default Java VM to start up Java Web Start, download the JNLP file, and then re-launch Java in the correct JVM. So, to better answer that question, I'm going to assume that you have installed Java 5 at some point. What does the <resources> tag in the remote JNLP file say?
That's okay. I enjoy talking about Java Web Start. :-) Let me know if you have any other questions. Scott ------------------ Scott Kovatch Apple Computer Java Runtime Classes Cleveland Hts, OH email@hidden I am Scott Kovatch, and I approved this message. |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden This email sent to email@hidden
| References: | |
| >javaws on command line (From: Steve Roy <email@hidden>) | |
| >Re: javaws on command line (From: Steve Roy <email@hidden>) | |
| >Re: javaws on command line (From: "Michael J. Vinca" <email@hidden>) | |
| >Re: javaws on command line (From: Steve Roy <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.