How to Open a Text File with Notepad using JAVA in NetBeansIDE.
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
To open Firefox, IExplorer or other browser with required page(url):
Process p=load.exec("path to browser executable file "+url); //url is the page to open
Follow us on :
Facebook : / raksrahul-100219708647780
Instagram : / raksrahul_ig
#Java #LearnJava #NetBeansIDE
Watch video How to Open a Text File with Notepad using JAVA in NetBeans online without registration, duration hours minute second in high quality. This video was added by user raksrahul 02 May 2013, don't forget to share it with your friends and acquaintances, it has been viewed on our site 35,908 once and liked it 72 people.