在 java web start 中,jar 文件下载到哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2635443/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
In java web start where does the jar file get downloaded to?
提问by ria
As per Java web start where does the jar file get downloaded on a client machine?
根据 Java web start,jar 文件从哪里下载到客户端机器上?
采纳答案by ria
In case of a Windows machine, you could go to the control panel and click on Java Control Panel to find the location of the Java Cache.
In my case it shows: C:\Documents and Settings\user1\Application Data\Sun\Java\Deployment\cache
如果是 Windows 机器,您可以转到控制面板并单击 Java 控制面板以查找 Java 缓存的位置。
就我而言,它显示:C:\Documents and Settings\user1\Application Data\Sun\Java\Deployment\cache
回答by bakkal
In case of a Linux machine, I have it on :
如果是 Linux 机器,我有它:
/home/bakkal/.java/deployment/cache/
/home/bakkal/.java/deployment/cache/
where /home/bakkal is just my personal home folder.
其中 /home/bakkal 只是我的个人主文件夹。
回答by medopal
On Mac
在 Mac 上
/Users/username/Library/Caches/Java/cache/
Just for fun:
I deployed a small game and found its jar file in
只是为了好玩:
我部署了一个小游戏,并在其中找到了它的 jar 文件
/Users/username/Library/Caches/Java/cache/6.0/42/1d3d9f6a-640bd5ed
The .jar was removed, if you want to run or decompile it, rename it with .jar
.jar 被删除,如果你想运行或反编译它,重命名它 .jar
UPDATE (OS X El Capitan)
更新(OS X El Capitan)
/Users/username/Library/Application Support/Oracle/Java/Deployment/cache
回答by Thirler
Keep in mind that the location on windows has changed. It was different in java 6 (compared to java 5).
请记住,Windows 上的位置已更改。它在 java 6 中有所不同(与 java 5 相比)。
回答by Thorbj?rn Ravn Andersen
Unless you have a Very Good Reason(TM) you should basically not have to care about that as that is the job of Java Web Start to handle.
除非您有一个非常好的理由 (TM),否则您基本上不必关心它,因为这是 Java Web Start 的工作。
If this is for locating the jar from insideyour own code, you can ask the class loader where it got the bytecode from. Given the security manager allows!
如果这是从定位罐子里面你自己的代码,你可以问的类加载器的地方,从得到的字节码。鉴于安全经理允许!