I am using eclipse to create a runnable jar. During runtime my code looks through the classpath for a config file, which it reads in. However, as a runnable jar it is not finding this config file. 开发者_如何学Python
I guess the config file will need to exist as a seperate entity on the filesystem somewhere. How do I specify the classpath in the Manifest to include this location when eclipse creates the runnable jar?
Thanks
Ensure your config file is under an eclipse source folder:
I use
- src\main
- src\test
- src\resources
All three are folders, added to the Eclipse project as source folders
If I add three files (one.xml, one.properties and one.config) to the src/main/package/ folder and then export a runnable jar they all appear in the runnable jar.
精彩评论