ClassLoader getResource Problem
I have txt file that I need to load automatically in my application, so the file name is specified directly in source code. For that happen I need to get relative path to txt file.
resources variable in ant source, is a path to "target\classes\resources\someFiles\"
When I run application in eclipse after configuring the class path, everything works fine, but when run the "executable" I get a FileNotFoundException
<javac debug="true" includeantruntime="false"
java.io.FileNotFoundException: file:\D:\Projects\px\applications\myApp\lib.jar!fi le.txt
(The filename, directory name, or volume label syntax is incorrect)
This are two techniques that I used to get File.txt path.
what is the correct way to get the path of the file? Or what is correct way to register a ClassPath?
Sorry for my bad english.