问题
Under Windows 7 and 8 with JRE 7 update 21 (32-bit in both cases), I encounter the error Cannot find cached resource for URL yyyyyyyyyyy.jar
for a JWS application that worked in JREs prior to update 21. If I try to download yyyyyyyyyy.jar by putting it into the browser, it works fine. It is the "main" jar file in my JNLP file.
回答1:
The actual problem is probably down to your web server sending the HTTP header "Cache-Control" with the value "no-store" to avoid caching. However, by specifying "no-store" it means JWS is unable to store the resources specified in your JNLP file.
To avoid this problem without having to disable "Keep temporary files on my computer" as this allows the application to work in offline mode, I updated my Apache web server configuration to send the following to disable intermediate proxies from caching content:
Header set Cache-Control "no-cache, must-revalidate, max-age=0"
Header set Pragma "no-cache"
回答2:
The solution for me was in the Java Control Panel -> General -> Temporary File Settings:
- Click "Delete Files..." and chose all options.
- Disable "Keep temporary files on my computer."
There's a video showing these steps: https://www.youtube.com/watch?v=uI9RbmT9PKs
回答3:
"Click "Delete Files..." and chose all options." only, than call the Web Start Resource (a .jnlp/JNLP File) again, else you would have to download all the files again and again.
回答4:
Upgrade from Java 7 to Java 8 to fix this.
来源:https://stackoverflow.com/questions/17053890/java-web-start-cannot-find-cached-resource-for-url