Java File Path Windows/Linux [closed]
Use System.getProperty("os.name")
for obtaining os name, depends on it set path to resource:
String resourcePath = null; switch (System.getProperty("os.name")) { case "Linux": resourcePath = "/home/romankooo/work/txt/"; break; case "Windows": resourcePath = "C:\\PDFMalwareDataAnalyser\\Txt\\"; break;}