[10] RFR JDK-6461834: Minimize WindowsLookAndFeel classes included with Unix JDKs

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Thu May 18 08:01:55 UTC 2017


So far I have looked, it seems jdk.jconsole uses this classes for 
windows only. These classes are specified in
JConsole.java where it checks (for non-windows, it will come as 
GTKLookAndFeel)

String systemLaF = UIManager.getSystemLookAndFeelClassName();
if (systemLaF.equals("com.sun.java.swing.plaf.gtk.GTKLookAndFeel") ||
systemLaF.equals("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")) {

try {
UIManager.setLookAndFeel(systemLaF); MaximizableInternalFrame.java where 
it checks for this classes in windows only if (JConsole.IS_WIN) {
try {
Class<?> Part =
Class.forName("com.sun.java.swing.plaf.windows.TMSchema$Part"); and 
Utilities.java where it checks LookAndFeel laf = UIManager.getLookAndFeel();
boolean transparent = laf.getClass().getName().equals(windowsLaF);

Modified webrev
http://cr.openjdk.java.net/~psadhukhan/6461834/01/

Regards
Prasanta

On 5/18/2017 12:36 AM, Phil Race wrote:
> The way to do this is to create a file
> src/java.desktop/windows/classes/module-info.java.extra
>
> and move the opens there.
>
> See for example
> src/java.base/windows/classes/module-info.java.extra
>
> But are you sure jdk.jconsole needs these only on Windows ?
> Better make sure of it.
>
> -phil.
>
> On 05/17/2017 03:49 AM, Prasanta Sadhukhan wrote:
>> Yes, actually I am bit unsure of how to proceed with that. It is 
>> meant to open internal java.desktop classes "only" to jdk.jconsole 
>> but now afer this fix, these classes will only be available in 
>> windows platform, so it should be a conditional "open" and I am not 
>> sure if module-info.java allows conditional open.
>>
>> Regards
>> Prasanta
>> On 5/17/2017 4:16 PM, Magnus Ihse Bursie wrote:
>>> Build changes looks good. However in 
>>> src/java.desktop/share/classes/module-info.java you are trying to 
>>> check in commented-out code instead of removing it.
>>>
>>> /Magnus
>>>
>>> On 2017-05-17 12:31, Prasanta Sadhukhan wrote:
>>>> Hi All,
>>>>
>>>> Please review a fix for an issue whereby it is seen that 
>>>> WindowsLookAndFeel classes are built for non-windows platform,
>>>> where it is not needed.
>>>> Proposed fix is to remove building these classes for non-windows 
>>>> platform.
>>>>
>>>> JPRT build is successful. Also, fixed the regression tests which 
>>>> expects this classes to be available in non-unix platform.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-6461834
>>>> webrev: http://cr.openjdk.java.net/~psadhukhan/6461834/00/
>>>>
>>>> There are some closed regression test which will be taken care 
>>>> after this in a separate crucible review.
>>>>
>>>> Regards
>>>> Prasanta
>>>
>>
>




More information about the build-dev mailing list