我们有一个使用 JavaWS 启动的应用程序。我知道 JNLP 内容中列出的 JAR 存储在客户端部署缓存中。有没有办法让我的应用程序获取用于启动它的实际缓存文件的列表?
我打印出了类路径:c:\Program Files (x86)\java\jre7\lib\deploy.jar
我使用 Java VisualVM 检查应用程序的属性,但没有发现任何乐趣。
最佳答案
当然。使用 JNLP API 的Is there a way for my application to get the list of the actual cache files used to launch it?
DownloadService
可以提供。
DownloadService
service allows an application to control how its own resources are cached, to determine which of its resources are currently cached, to force resources to be cached, and to remove resources from the cache. The JNLP Client is responsible for providing a specific implementation of this service.
关于java - 我的应用程序需要 JavaWS 缓存文件列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22366857/