Should this work?

Alan Bateman Alan.Bateman at oracle.com
Sun Aug 2 20:40:15 UTC 2015



On 02/08/2015 12:58, Michael Hall wrote:
> You may of missed here that I had switched to testing with the trivial test class I posted earlier. Shown below.
>
> That simply does…
> javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
>
> No QuaQua involved.
>
> I could try running with the quaqua jar in class path and this again…
> 		try {
> 			if (System.getProperty("os.name").equals("Mac OS X"))
> 				UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");
> 			else
>    				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
> 		} catch (Exception e) {
> 		}
>
> But I’m not sure how that would improve the chances of seeing the Aqua java.desktop dependencies?
> ----------------------------------------------------------------------------------------------------------------------
> Current Test Class: (Running it java -verbose:class does show it loading com.apple.laf)
>
> import javax.swing.JFrame;
>
> public class JdepLAF {
>
> 	public static void main(String[] args) {
> 	    try {
> 	    	javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
> 			JFrame tester = new JFrame("Test jdeps on Aqua LAF");
> 			tester.pack();
> 			tester.setVisible(true);
> 		}
> 		catch (Exception ex) { ex.printStackTrace(); }
> 		System.out.println("exiting...");
> 	}
> }
>
The com.apple.laf.* classes are in the java.desktop module and are 
selected and used on your behalf then you select the system LAF. Your 
code isn't directly linking to these classes so this is why jdeps 
doesn't report them as a dependency. Hopefully I can convince you that 
jdeps is doing the right thing.

-Alan.


More information about the jigsaw-dev mailing list