JDK-6712190 : Java Web Start behaves differently on Windows Terminal Server wrt file "deployment.config"
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2003
  • CPU: x86
  • Submitted: 2008-06-09
  • Updated: 2011-02-16
  • Resolved: 2009-01-29
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
6u12 b03Fixed
Description
Java Web Start behaves differently on Windows Terminal Server as 
compared to regular Windows environment with respect to system level 
"deployment.config" file.
On regular Windows environment, "deployment.config" file is found in 
"<Windows Directory>\Sun\Java\Deployment\deployment.config".
On Windows Terminal Server however, "deployment.config" file is found 
in "\Dokumente und Einstellungen\<User-ID>\Windows\Sun\Java\Deployment".
So, "javaws.exe" is not "Terminal-Services-aware".


Please find below some more details concerning the problem.

1. Sun docs
-----------
According to Sun's Java Web Start documentation, the optional file 
"deployment.config" is expected to be found in two distinct locations
on Windows operating systems:

See http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html
or
See http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/properties.html
----------------------------------------------------
System Level
------------
[ ... ] If deployment.config exists, it is located either here

    Operating System    Location
    Windows 	        <Windows Directory>\Sun\Java\Deployment\deployment.config

 or here

    Operating System   Location
    Windows 	       ${deployment.java.home}\lib\deployment.config

(${deployment.java.home} is the location of the jre from which 
the deployment products are run. Deployment products include 
Java Web Start, Java Plug-in, Java Control Panel ...)
----------------------------------------------------


2. Windows API: GetWindowsDirectory()
-------------------------------------
According to Microsoft's documentation, the function GetWindowsDirectory()
results in different return values, depending on whether the function is
called under a regular Windows environment or under a Windows Terminal 
Server environment. 

Please see MSDN article
http://msdn.microsoft.com/en-us/library/ms724454(VS.85).aspx
------------------------------------------------------------
Remarks   
[ ... ]
Terminal Services:   If the application is running in a Terminal Services
   environment, each user has a private Windows directory. There is also a 
   shared Windows directory for the system. If the application is
   Terminal-Services-aware (has the
   IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE flag set in the image 
   header), this function returns the path of the system Windows directory, 
   just as the GetSystemWindowsDirectory function does. Otherwise, it 
   retrieves the path of the private Windows directory for the user.
------------------------------------------------------------

Please find attached demo program "getsystemhome.exe", which is not
"Terminal-Services-aware" ("getsystemhome.c" is attached as well):

2.1 Windows XP SP2
------------------
C:\> getsystemhome.exe
kernel32.dll found
GetSystemWindowsDirectory API call is available, running Windows 2000 or
higher
GetWindowsDirectory        C:\WINDOWS
GetSystemWindowsDirectory  C:\WINDOWS
running in a pure Windows System environment

C:\> 

2.2 Windows Terminal Server 
---------------------------
On Microsoft Windows Server 2003 R2 SP2 running as "Administrator" we get:

C:\> getsystemhome.exe
kernel32.dll found
GetSystemWindowsDirectory API call is available, running Windows 2000 or higher
GetWindowsDirectory        C:\Documents and Settings\Administrator\WINDOWS
GetSystemWindowsDirectory  C:\WINDOWS
running in a Terminal Server environment

C:\>


3. Java Web Start
-----------------
So, on a Windows Terminal server Java Web Start "javaws.exe" does not 
find file "deployment.config", when it is placed as suggested by the 
docs in directory 
"<Windows Directory>\Sun\Java\Deployment\deployment.config".

This is what the problem is about.

Comments
EVALUATION Fix has been tested by the customer and confirmed working. Current targeted release is 6u12.
11-11-2008

WORK AROUND Placing file "deployment.config" in ${deployment.java.home}\lib\deployment.config works as suggested in both normal Windows and in Windows Terminal Server environment.
09-06-2008