简体   繁体   中英

Copy files from an autoexec jar to java.io.tmpdir

I'm trying to copy two local files from my jar to the java temp dir defines like that :

String strDirectoy = System.getProperty("java.io.tmpdir") + path;

It works great when I launch it from eclipse, but when I try to launch it from the exported autoexec jar, it does'nt work !

Did I missed something ?

Ok I know what I've done wrong : - First : eclipse does'nt export my own files (the ones I wanted to copy) So I have to copy them in the jar manually after it had been exported by eclipse.

  • Second : I have to put them in the main directory of the jar, if I don't do that, java can't find the files in question.

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