Fix window size setting for 1.6+, improve Windows Java detection