Netbeans rcp中获得本地文件系统路径

mac2022-06-30  24

通过file协议

——————————————————————————————————————————————————————

            URL url = new URL("file:///E:/AutoTest.exe");            File file1 = Utilities.toFile(url.toURI());            System.out.println(file1.getAbsolutePath());            final Process process = Runtime.getRuntime().exec(file1.getAbsolutePath());            int exitCode = process.waitFor();            if(exitCode == 0) {                // 读取结论                            }

转载于:https://www.cnblogs.com/cuizhf/p/7508989.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)