Pages

Monday, June 13, 2016

HOW TO OPEN YOUR NOTEPAD THROUGH JAVA PROGRAMS

Hello friends,Now i am back with new java programs.Now you can open your notepad in programmer style.Now i am going to tell you how to open your notepad through java programs.
Notepad is mostly used software.notepad is very useful for programmer because most of the programs run through notepad.like java c, c++ etc.
Steps to create a java programs to open notepad.
Step 1:-Open your notepad
Step 2:-Copy paste this code

     import java.util.*;
    class notepad
   {
           public static void main(String []a) throws Exception
          {
               Runtime r=Runtime.getRuntime();
               r.exec("notepad");
     
          }
  }
Step 3:-Now Save this with extension .java for example notepad.java
Step 4:-Again open new notepad file.
Step 5:-Copy paste this code
            javac notepad.java
           java notepad
          pause
Step 6:-Save this file with extension .bat for example notepad.bat
Step 7:-Now click at this file.