SplashScreen and NSApplicationAWT (original) (raw)
Anthony Petrov anthony.petrov at oracle.com
Wed Nov 23 08:11:55 PST 2011
- Previous message: dlload() a library from JDK's lib/ not knowing its full path
- Next message: SplashScreen and NSApplicationAWT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
Another issue with the splash screen is that it needs to display a window on the screen. For this purpose the Cocoa event loop must be started, and as such an NSApp instance be initialized. And this instance is a singleton in Cocoa.
I see that there's already a custom NSApplication descendant present (the NSApplicationAWT), and we can't create and initialize it at the time of splash screen showing since the AWT dynamic library isn't loaded yet.
I see two options to resolve this:
Move the NSApplciationAWT code into the Java launcher code. Either the splash screen code, or AWT would trigger the creation of an application instance. This approach, however, might require a lot of refactoring.
Use Xlib to display the splash screen. This must be the easiest solution, although it may appear a bit inconsistent to the end user (the X icon flashing in the dock, etc. - but perhaps there's a way to suppress that?) Also, I'm not sure if an Xlib-based app is able to actually initialize Cocoa later.
Any thoughts on this?
-- best regards, Anthony
- Previous message: dlload() a library from JDK's lib/ not knowing its full path
- Next message: SplashScreen and NSApplicationAWT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]