JDK-6674101 : service tag entry not added to the registry on Windows XP Professional x64 Edition
  • Type: Bug
  • Component: install
  • Sub-Component: servicetags
  • Affected Version: 6u5,6u6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows,windows_xp
  • CPU: generic,x86
  • Submitted: 2008-03-11
  • Updated: 2013-06-04
  • Resolved: 2008-09-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10 b24Fixed
Related Reports
Duplicate :  
Description
To reproduce:
1) Install service tag software from inventory.sun.com
2) Install 64-bit jdk on Windows XP 64bit OS. 
3) At the end of installation click Finish button to popup the
   registration. JDK is registered successfully.
4) Run CLI stclient -x to verify  the service tag entries. 
   There is no service tag entry created for the installed JDK.
   There is only one service tag for Microsoft Windows XP.

Comments
SUGGESTED FIX Here are the diffs the webrev is also attached, tested on win-x86 and win-x64 *** /tmp/geta10114 Wed Mar 12 16:39:42 2008 --- /tmp/getb10114 Wed Mar 12 16:39:42 2008 *************** *** 19,24 **** --- 19,28 ---- class Util { private static boolean verbose = (System.getProperty("servicetag.verbose") != null); private static String jrepath = null; + private static final String REGKEY_END = + "microsoft\\windows\\currentversion\\app paths\\stclient.exe"; + private static final String STCLIENT_END = "Sun\\servicetag\\stclient.exe"; + private static final String WIN32_STCLIENT = "c:\\Program Files (x86)\\" + STCLIENT_END; // for debugging and tracing static boolean isVerbose() { *************** *** 198,209 **** * Gets the stclient path using a well known location from * the Windows platform Registry, otherwise it will return null. */ ! static File getWindowsStClientFile() { File out = null; ! String regKey = "software\\microsoft\\windows\\currentversion\\app paths\\stclient.exe"; String keyName = "" ; // use the default key String path = getRegistryKey(regKey, keyName); - if (path != null && (new File(path)).exists()) { out = new File(path); } --- 202,214 ---- * Gets the stclient path using a well known location from * the Windows platform Registry, otherwise it will return null. */ ! private static File getWindowsStClientFile(boolean wow64) { File out = null; ! String regKey = (wow64 == true) ! ? "software\\Wow6432Node\\" + REGKEY_END ! : "software\\" + REGKEY_END; String keyName = "" ; // use the default key String path = getRegistryKey(regKey, keyName); if (path != null && (new File(path)).exists()) { out = new File(path); } *************** *** 213,218 **** --- 218,258 ---- return out; } + /** + * Finds a stclient in 32 and 64 bit environments, first by querying + * the windows registry, if not then get the well known paths for + * 64bit see http://support.microsoft.com/kb/896459 + */ + + static File getWindowsStClientFile() { + File stclient = null; + + // try to get the default entry + stclient = getWindowsStClientFile(false); + if (stclient != null) { + return stclient; + } + + // we might be on x64, then try the wow64 area + stclient = getWindowsStClientFile(true); + if (stclient != null) { + return stclient; + } + + // try the default hard coded path, maybe wow64 registry is missing + stclient = new File(WIN32_STCLIENT); + if (stclient.canExecute()) { + if (isVerbose()) { + System.out.println("stclient(default)=" + stclient); + } + return stclient; + } + if (isVerbose()) { + System.out.println("stclient not found"); + } + return null; + } + /** * This uses reflection to access a private java windows registry * interface, any changes to that Class must be appropriately adjusted.
12-03-2008

EVALUATION The Service Tags software is a 32-bit application whose registry key is being stored in a different branch under HKEY_LOCAL_MACHINE\Software\WOW6432Node (http://blogs.msdn.com/craigmcmurtry/archive/2004/12/14/301155.aspx). When 64-bit JDK looks up the path of stclient, it looks up from the 64-bit Windows registry. It can't find stclient and thus didn't add a service tag for the 64-bit Windows registry. This bug doesn't impact the product registration. 64-bit JDK on Windows is not discoverable due to this bug. We'll fix this in JDK 6u10.
12-03-2008