I have java app, where I copy directories (with subdir and files) to SDCard. I wanted to save these dirs with project. In eclipse everything works fine. But, when I export project to runnable jar, app is not able to find or copy these dirs. No error is showed.
File folder2 = new File(getClass().getResource("/urgent/").getFile());
File folder4 = new File(getClass().getResource("/service/").getFile());
The path, I get from jar app, when I want to copy dir is:
jar:file:\C:\path\to\jar\file\myapp.jar!\urgent
project hierarchy:
-project
--src
--build
--urgent
---subdir
--service
---subdir
Is it possible to work with your own directories in jar and how?