FULL PRODUCT VERSION :
JDK 9, JDK 8, JDK 7
ADDITIONAL OS VERSION INFORMATION :
MS Windows OS
A DESCRIPTION OF THE PROBLEM :
If the applet deployed by means of JNLP file tries to remove a certain JAR file from Deployment Cache by calling "javax.jnlp.DownloadService.removeResource(URL ref, String version)" method, and if the JAR file is not in the cache, the file is unnecessarily downloaded first and then is removed from the cache.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Upload HTML, JNLP and 2 JAR files from the attached archive file "JarIsDownloadedOnRemoveResource.zip" with the test case into a directory on a web server.
2. Install the testable JDK 9, JDK 8 or JDK 7.
3. Remove "JarToRemoveFromCache.jar" file from Java Cache, if it is in the cache, by using Java Cache Viewer application from Java Control Panel.
4. Go to "Java Control Panel -> Advanced" and:
- Switch on "Debugging -> Enable tracing"
- Choose "Java console -> Show console"
5. Open a web browser and load HTML page with the test case from the step #1.
6. The bug is reproduced, if Java Console contains a record starting with "network: Downloaded" string for "JarToRemoveFromCache.jar" file.