Copy files from an autoexec jar to java.io.tmpdir
Domanda
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 ?
Soluzione
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.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow