I know how to check for a file in a specific directory or a specific directory but I can't figure out how to check for a file that is outside of the jar that is being run but in the same directory as it: Test.jar - Ran -> Get location of Test.file Test.file
Answered - Thank you!
This works great;
final Class<?> referenceClass = Client.class;
final URL url = referenceClass.getProtectionDomain().getCodeSource().getLocation();
try{
final File jarPath = new File(url.toURI()).getParentFile();
System.out.println(jarPath);
} catch(final URISyntaxException e){
// etc.
}