I am trying to get a path to a Resource but I have had no luck.
This works (both in IDE and with the JAR) but this way I can\'t get a path to a file, only the file
private static final String FILE_LOCATION = "com/input/file/somefile.txt";
//Method Body
InputStream invalidCharacterInputStream = URLClassLoader.getSystemResourceAsStream(FILE_LOCATION);
Getting this from getSystemResourceAsStream
is the best option. By getting the inputstream rather than the file or the URL, works in a JAR file and as stand alone.