public String findDirectory(){
URL url = InputGrade.class.getResource("");
File file1 = new File(url.getFile());
String path = file1.getParent();
while (-1 != path.lastIndexOf("bin") || -1 != path.lastIndexOf(".jar")) {
file1 = new File(path);
path = file1.getParent();
}
if (path.startsWith("file")) {
path = path.replaceAll("file:", "");
}
return path;
}