JDK-8024685 : $USER_HOME not working anymore
  • Type: Bug
  • Component: deploy
  • Affected Version: 7u21
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_7
  • Submitted: 2013-06-07
  • Updated: 2016-06-01
  • Resolved: 2016-04-21
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 9
9 b117Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
java version  " 1.7.0_21 " 
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Windows 7 64Bit SP1

A DESCRIPTION OF THE PROBLEM :
In JRE 1.6.45 (latest tested) it was possible to use some variables in the  " deployment.properties "  file like:
deployment.user.cachedir=$USER_HOME\\cache\\6.45
deployment.system.cachedir=$JAVA_HOME\\cache

in JRE 1.7.xx is not possible to use at leas the most important $USER_HOME variable.

REGRESSION.  Last worked in version 7u21

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
create the deployment.config / deployment.properties
add following line: deployment.user.cachedir=$USER_HOME\\cache

open the java CPL and check the General -> Temporary Internet File -> Settings
See the Locations Path.....

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Location Path should be:

C:\Users\TestUser1\AppData\LocalLow\Sun\Java\Deployment\cache


ACTUAL -
Location Path is: $USER_HOME\cache

wich is wrong!

ERROR MESSAGES/STACK TRACES THAT OCCUR :
The first benefit of using this variable was to configure different user-java caches for multible JRE installations on our system.

But the biggest problem is when users have roaming profiles and  they login for some resons with a differnt profile name like  " TestUser1.Domain " 

That means the original installation of Java was here:

C:\Users\TestUser1\AppData\LocalLow\Sun\Java\Deployment\cache

Now the user path is something like this:

C:\Users\TestUser1.Domain\AppData\LocalLow\Sun\Java\Deployment\cache

but Java is not able to detect that and is looking in a path which dosen't exist
(C:\Users\TestUser1\AppData\LocalLow\Sun\Java\Deployment\cache)
which causes of cause some trouble starting some Java-Apps

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Make the $USER_HOME variable working again or implement a propper
java home detection!
Comments
Release team: Approved for deferral.
22-10-2013

It's quite old regression. The same issue exists in JDK7 and I'm not sure which release/build introduced this issue. It's not new in JDK8 and it shouldn't be critical for JDK8.
21-10-2013

This appears to be a regression, is it possible to get some indication of how common it is to use $USER_HOME. Also is $USER_HOME derived from the ${user.home} property, if so then this has changed significant in 8 (hence the comment to understand if there is an issue on 8 or not).
18-10-2013

SQE-Ok to defer this issue to 8-pool
16-10-2013

One for the Dev team. webbug. Was this an intentional change ?
12-09-2013