Should this work?

Michael Hall mik3hall at gmail.com
Sat Aug 1 20:57:28 UTC 2015


> On Aug 1, 2015, at 2:59 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> 
> On 31/07/2015 22:16, Michael Hall wrote:
> 
>> Fwiw, I have tried -R recursive, and even -jdkinternals. Neither gave me the laf dependenciies for my application jar.
>> I was not successful in using -M for module information to see if anything else identified java.desktop as a required module, it just didn’t work for me.
>> Neither did -p to try and go directly after the package, or -filter:package.
>> Either these are not in place or my build or usage is incorrect.
>> But, having been unable to get jdeps to indicate java.desktop as a module dependency for the Aqua laf I still might consider this a concern if someone was trying to determine required modules for a OS X swing application. I haven’t tried other platforms.
>> Maybe I should at least wait on doc before having concerns but this still seems one.
>> 
> 
> So is jdeps printing anything? If you are directly make use of anything in the java.desktop module then I would expect it to be printed.
> 
Yes, most of the dependencies I think are showing up.
The laf code wasn’t.
I did notice that when run this way…
jdeps -v halfpipe.jar

At the front it listed modules including…
halfpipe.jar -> java.desktop

I can’t tell from that though what produced the requirement for java.desktop. -module options didn’t seem to show this either on a class by class basis. 

> There are two UIManager.setLookAndFeel methods. One takes a String with the class name of the LAF. The other is a concert LookAndFeel implementation. Which method are you using?

Generally I have used something like…
		try {
			if (System.getProperty("os.name").equals("Mac OS X")) 
				UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");
			else
  				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
		}
Which means it wouldn’t use Aqua since I started doing pointing to the 3rd party laf. But I have been unable to find where I do that for this particular application. So you’d think I’d be getting default laf. What is that metal? It would surprise me if that’s what I’m using. 

I did find one application where I do use the above code. The jdeps output didn’t show l&f classes but did show some Apple.
   "org.bjb.OSXApplication"                           -> "com.apple.eawt.Application (JDK internal API (java.desktop))";
   "org.bjb.OSXApplication"                           -> "com.apple.eawt.ApplicationListener (JDK internal API (java.desktop))";

(Those are in a different launcher jar for the app I’m currently testing but run against that jar they also show up).

I haven’t been into that code for a while but I’ll try to change it to force system look and feel and see if aqua turns up in the jdeps output. Should be a little simpler than the current application I’m testing with.

Michael Hall






More information about the jigsaw-dev mailing list