JDK-8043453 : deploy.dll needs to stop copying javaws.exe to the system dir
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 8u20,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-05-19
  • Updated: 2015-09-17
  • Resolved: 2014-07-08
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.
8u20 b22Fixed 9Fixed
Related Reports
Duplicate :  
Copying binaries to the system directory goes against Microsoft standard practices.  Please see the following CR for 8u20/9


Our justification and design is described in the ccc request at http://ccc.us.oracle.com/7166597

We've stopped copying java.exe/javaw.exe to the system directory n 8u20.  Under this CR, we need deployment team to stop copying javaws.exe to the system directory, and instead create a symlink in the new javapath directory.  It is a fairly simple fix on the deploy side.  This is a high priority due to files-in-use scenarios with JRE upgrades.  
SQE OK to take the fix as far as JDK-8048023 is incomplete without the fix.

8u20-critical-request justification: This fix is needed for JDK-8048023. Without it JDK-8048023 is not complete, since javaws.exe will be still copied to system folder. Risk is low for shortcuts creation, we only using different path for javaws.exe and added code to update shortcuts javaws.exe path during install/uninstall/update of JRE. No other functionality should be affected.

When clicking symbolic link in Windows Explorer or when creating shortcut with target to symbolic link, then it does not work and I am getting error message (see Untitled.png). Looks like we need another solution for stopping copy javaws.exe to system32 folder.

I have created https://bugs.openjdk.java.net/browse/JDK-8044821 to stop copying javaws.exe in system directories. With this fix, we'll use the same approach as https://java.se.oracle.com/code/cru/CR-JDK8UDEV-18 for adding javaws.exe to the user's sytem path. Also, re JDK-8043453 I suggest the javaws symlink (created under "%ProgramData%\Oracle\Java\javapath") target is used for shortcut creation. Symlink's target would be updated during install/uninstall so that the symlink always points to javaws.exe in the latest jre/bin directory. Using this target path would make sure that the upgrade/downgrade scenarios are properly handled during shortcut creation.

As discussed with deploy team, we think best approach would be is installer take care of javaws.exe in similar way as java.exe/javaw.exe. Can you file bug for installer to do this? As part of this issue I will remove passing COPY and DEL command to installer as well fix shortcuts creation to point to new location. And for your question we do not copy anything else.

Deploy.dll currently passes back COPY or DEL command for the installer to use. The installer will execute the copy or del command. So perhaps we need another case for SYMLINK, where deploy passes back which javaws.exe to link to in the javapath. or another approach is installer can just take care of javaws.exe as a special case. We would just mimic what we do with java.exe/javaw.exe already (in pending fix). Another question, which plugin files do we copy around the systemg? Do we still copy plugin files to the firefox dir? What about dt file to system dir?

The install fix for this is actually pending peer review: https://java.se.oracle.com/code/cru/CR-JDK8UDEV-18 It will be 8u20/9 in the near future.

You mention that 8u20 should no longer copy java.exe/javaw/exe to system directory in 8u20. I tried 8u20 b14 and it still copies. Do you know in which build this fix will be available?