JDK-6474738 : AIOOB from Win32ShellFolder2.getFileChooserIcon when starting NB IDE inst on Win Vista RC1 5600
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P1
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2006-09-25
  • Updated: 2011-02-16
  • Resolved: 2006-11-02
Related Reports
Relates :  
Description
Installer fails to start. It happens when UIDefaults.get is called with parameter FileChooser.upFolderIcon. If I make the same call from simple app it does not happen so it is probably caused by some modification on UIDefaults installer does. I patched JDK sources to get log of get/put calls with parameters. I will attach this log too. The same works fine on Windows XP. It happens both on JDK 1.5.0_09 and JDK 1.6.0 b99.
How to reproduce: Simply run installer exe downloaded from http://www.netbeans.info/downloads/download.php?a=n&p=1 select version 6.0, daily builds (actually it does not matter what version). To get log use command line option -is:log <Log file> eg. -is:log a.log.
I attached simple test app to reproduce this problem. If it is run in compatibility mode (I simply set compatibility mode for java.exe to Win XP SP2.) It throws AIOOBE when UIDefaults.get("FileChooser.upFolderIcon") is called in Win L&F.

Comments
EVALUATION Java doesn't support Windows Vista compatibility modes so we will not fix this now.
02-11-2006

EVALUATION The cause is that when the installer is run as .exe file, Windows Vista's function GetVersion() returns value with OS version 5.1 (that is, Windows XP), while it should return 6.0. This version number is critical for us when we extract resources (images and icons) from Windows files. So, the incorrect version number makes our code to access native resources in the wrong way. When the installer is run via "java -jar" command line, it returns the correct OS version. Vista is so smart that it automatically recognizes that the setup launcher is not "Vista ready" and tries to run it in so called "XP Compatibility mode", that is it pretends to be XP not Vista, that's why GetVersion() returns 5.1 instead of 6.0.
05-10-2006

WORK AROUND For successfull installation of NetBeans on Vista, I suggest to force it runing in the "real Vista mode" manually: 1) right click on the installation executable and open the "Properties" dialog 2) switch to the "Compatibility" tab 3) click the "Show settings for all users" button 4) in opened dialog, uncheck the "Run this program in compatibility mode for" checkbox 5) click "Apply" and close the both opened dialogs 6) run the executable
05-10-2006

WORK AROUND If I extract installer jar setup.jar using -is:extract and run it with "java -jar setup.jar" installer starts.
25-09-2006