JDK-6886430 : User homedir is not a valid directory
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2003
  • CPU: x86
  • Submitted: 2009-09-29
  • Updated: 2011-02-16
  • Resolved: 2010-06-19
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 JDK 7
6u21 b01Fixed 7Fixed
Description
FULL PRODUCT VERSION :
JRE 1.6.0_11

ADDITIONAL OS VERSION INFORMATION :
Windows 2003

A DESCRIPTION OF THE PROBLEM :
The following problem occured in the context of a large e-government website.
We don't rely on simple user/password authentification, instead we use
public/private key authentication with java applets.
In the login applet we are evaluating user.home and search for a login keystore.

Some users reported that the login applet stopped working after upgrading from jre 1.6.0_07 to 1.6.0_11.

After deactivating the Next Generation Java-Plugin for 1.6.0_11 the problem disappeared and everything
worked as usual.

We tracked down the problem to a slight difference in the system properties between the Next Generation
Java Plugin and the Classic Plugin (both with jre 1.6.0_11):

In some cases the Next Generation Plugin would set user.home to a UNC network ressource.

A real-life example to demonstrate the differences between the Next Generation and the Classic Plugin:

Classic:
user.dir = \\s6077769\desktop
user.home = C:\Dokumente und Einstellungen\0077769BER0000000001
user.name = 0077769BER0000000001

Next Generation:
user.dir = \\s6077769\desktop
user.home = \\s6077769
user.name = 0077769BER0000000001

The value of "user.home" is expected to be a directory (according to http://java.sun.com/docs/books/tutorial/essential/environment/sysprop.html).

Unlike "C:\Dokumente und Einstellungen\0077769BER0000000001" The UNC network ressource "user.home = \\s6077769"
is not recognized as a directory by java (File.isDirectory()==false)

user.home MUST be a directory

We consider this to be a major bug, because the only known workaround is abandon the Next Generation Java-Plugin and switch back to the Classic Plugin


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
File.isDirectory() on user.home is always true.
ACTUAL -
File.isDirectory() on user.home sometimes is false.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
switch back to the Classic Plugin

Release Regression From : 6u7
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
SUGGESTED FIX webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u20/6886430.2
26-02-2010

EVALUATION The new plugin relies on the java launcher to set the user.home property which will be set to the UNC network resource. A fix will be for the windows platform, set the user.home property to the USERPROFILE env. setting.
19-02-2010