Your name looks wrong - incorrect extension and the wrong kind of slash:
private static final String ENDINGS_FILE_NAME = "res/endingRule.txt";
Jon Skeet
2010-09-30 15:04:25
Your name looks wrong - incorrect extension and the wrong kind of slash:
private static final String ENDINGS_FILE_NAME = "res/endingRule.txt";
To retrieve the file inside the jar, use:
private static final String ENDINGS_FILE_NAME = "/res/endingRule.txt";
...
InputStream is = getClass( ).getResourceAsStream(ENDINGS_FILE_NAME);
The \
is being interpreted as an escape character rather than directory separator. File name is also off. Try:
private static final String ENDINGS_FILE_NAME = "res/endingRule.txt";