简体   繁体   English

在java web start中,jar文件下载到哪里?

[英]In java web start where does the jar file get downloaded to?

根据Java web start,jar文件在客户端机器上下载了什么?

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. 对于Windows机器,您可以转到控制面板并单击Java控制面板以查找Java Cache的位置。
In my case it shows: C:\\Documents and Settings\\user1\\Application Data\\Sun\\Java\\Deployment\\cache 在我的例子中,它显示:C:\\ Documents and Settings \\ user1 \\ Application Data \\ Sun \\ Java \\ Deployment \\ cache

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重命名.jar

UPDATE (OS X El Capitan) 更新(OS X El Capitan)

/Users/username/Library/Application Support/Oracle/Java/Deployment/cache

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只是我个人的主文件夹。

Keep in mind that the location on windows has changed. 请记住,Windows上的位置已更改。 It was different in java 6 (compared to java 5). 它在java 6中有所不同(与java 5相比)。

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 inside your own code, you can ask the class loader where it got the bytecode from. 如果这是从你自己的代码定位罐子,你可以问的类加载器的地方,从得到的字节码。 Given the security manager allows! 鉴于安全经理允许!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM