Hi there, I have some problems deploying my application with jar files, here’s my directory structure:
- /dactylo/ - here reside every .class file
- /data/ - text files with data in it like the properties file
- /data/lessons - text files with lessons needed
- /gfx/ - all the images are in here
My program is packaged in “package dactylo;” and when I start my program in eclipse, everything works fine.
I got the following methods accessing components outside the package:
- I read the content of /data/lessons with:
File dir = new File(“data/lessons”);
- I read several images all using
Toolkit.getDefaultToolkit().getImage(“gfx/image_name”);
- I read a properties file using:
properties.load(new FileInputStream(“data/dactylo.properties”));
My question is, when I package everything inside a .jar file, the images won’t load, the File returns a NullPointerException and the property file doesn’t load. I know there is a problem with relative filenames and stuff but I don’t know how to resolve the problem.
When I copy the folders data and gfx to the jar file, everything works fine, but I want to use webstart to deploy my software and as I know, everything has to be inside jar files to actually make them load.
I’d really appreciate every help I get 
