这两个操作系统在Java中创建文件路径的最佳解决方案是什么.应用程序将用于此操作系统,我需要创建通用字符串.
例如:对于Linux:
public File folderTxt = new File("/home/romankooo/work/txt/");
Run Code Online (Sandbox Code Playgroud)
对于Windows:
public File folderTxt = new File("C:\\PDFMalwareDataAnalyser\\Txt\\");
Run Code Online (Sandbox Code Playgroud)
或者是为此操作系统生成2个.jar文件的最佳解决方案.
非常感谢.