This is probably a repeated question asked by several people, but i could not understand after searching the answers.
netbeans creates a folder dist after a build operation. I want to place a text file in that folder, the jar file should read the text file.
The target platforms are windows and linux
structure of the folders,
.java file = C:\My Documents\NetBeansProjects\Example\src\example
build folder = C:\My Documents\NetBeansProjects\Example
build folder contains classes folder. classes folder contains all the class files
dist folder = C:\My Documents\NetBeansProjects\Example
dist folder contains the .jar files and i want to place a text file inside this folder
the,
getClass().getClassLoader().getResource("example.txt");
seems to work only if the path is along with .java files.
Thanks