简体   繁体   中英

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.
In my case it shows: C:\\Documents and Settings\\user1\\Application Data\\Sun\\Java\\Deployment\\cache

On Mac

/Users/username/Library/Caches/Java/cache/


Just for fun:
I deployed a small game and found its jar file in

/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

UPDATE (OS X El Capitan)

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

In case of a Linux machine, I have it on :

/home/bakkal/.java/deployment/cache/

where /home/bakkal is just my personal home folder.

Keep in mind that the location on windows has changed. It was different in java 6 (compared to 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.

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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