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
Смотрите видео How to Open a Text File with Notepad using JAVA in NetBeans онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь raksrahul 02 Май 2013, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 35,908 раз и оно понравилось 72 людям.