How to Open a Text File with Notepad using JAVA in NetBeans
Here I used Runtime class and Process class to execute the command for opening notepad
1. Create a main class.
2. Enter code in main method {
Runtime rt=Runtime.getRuntime();
String file="path of your file";
Process p=load.exec("notepad "+file); // a space is required after notepad
3. Run the File.
4. Finish
Like My Facebook Page for more video updates:
https://www.facebook.com/pages/Raks/335960303097841
Comments
Post a Comment