Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installers for Java Apps



Thomas Singer wrote:

We've dropped Java Web Start because of massive problems on the Mac.
For instance, it did not place the menu bar on the top of the screen -
no matter where we set the option (in our application or the
Info.plist file).

Really? Can we (I?) see your JNLP file?

We've dropped JWS support one or two years ago.

This should be working on Tiger.

Maybe Tiger became better after our problems in the past - we haven't tried
it again.

We had this working in Jaguar under Java 1.4.

In the JNLP file you can specify the screen menu bar property in the
properties section and it will be set at application launch time, as
long as it's in the first resources block of the JNLP file.

Of course we did that, but for some weird reason it was not picked up.

After a lot of beating on the proverbial brick wall, we found these issues we needed to understand:
- the screen menubar property is only evaluated *once* when Swing/AWT is loaded
- WebStart loads Swing/AWT *before* the application main routine is invoked
- the property tag *must* be in the first (textually) resources block in the JNLP


The first two issues mean that it is impossible to set the property in active code in a JWS app, setting it via the JNLP file is the only option. The last issue is very subtle -- if there is a resources block above the one containing the property tag in the JNLP the property still gets set, but *after* Swing/AWT loads. Even resources blocks qualified with other OS or ARCH specifications count as the first block. IIRC there is also a bug in Sun's parsing code that causes JWS to ignore OS or ARCH specifications on the first resources block (although that may be fixed by now, or it may be part and parcel of the bug Scott mentioned).

Once we understood these issues, it just worked.

There are some other issues with the screen menu bar that apply regardless of how the app is started on the Mac. The menubar property only applies to the Mac OS X/Aqua PLAF, so if you set a different PLAF (e.g. Metal so the app looks the same on all platforms) the menu bar will be shown in the frame. Apple's Java creates a parallel set of AWT menus that are displayed in the system menu bar, it does not directly display the Swing menus, so there can be synchronization issues between the two if you do unusual things like dynamically changing a menu while it is displayed.

Our app is an internet conferencing application, and JWS is a natural fit for it. As a user, I'm not sure I'd be as happy with it for a more traditional, document-centric application. I like having an installer or disk image squirreled away in case I need to reinstall and a network connection is not available (or worse, the vendor has gone out of business).
_______________________________________________
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


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.