打开文本的程序命令

xiaoxiao2022-06-11  27

import java.io.*; public class ShowJava { public ShowJava() { } private static String fileName = "C:/Users/Toyeeb/Desktop/help.txt"; public static void main(String[] args) { Runtime rt = Runtime.getRuntime(); String exePath = "notepad.exe " + fileName; try { rt.exec(exePath); } catch (IOException e) { System.out.println("can't find the file!"); } } }

 

相关资源:打开文本文档
转载请注明原文地址: https://www.6miu.com/read-4931474.html

最新回复(0)