I am trying to make a reference to a config file that is located in a jar.
I am doing this by te following: file = new FileInputStream(sConfigFileName);
where the sConfigFileName is supposed be the path to the config file. But what I want to do is reference to a file in a jar. Does anybody know what to give as path to the config file?
Try using Class.getResourceAsStream().
doesnt seem to work...
I read the file as follows:
FileInputStream file = (FileInputStream)this.getClass().getResourceAsStream(sConfigFileName);
sConfigFileName is the string : config.txt
The file is located at the root of the jar file...