As a part of learning how to Program in JAVA with Text Editor, first step is to open any text editor. In windows environment open text editor(Notepad) and write Hello World! program.
Save this file as Example.java in one of the folder. Let's save it in Test folder on your Desktop.
Next step is to compile your java class in to bytecode.
Open command prompt and change directory to Test where you saved java file.
Type javac Example.java and hit enter.
It will compile and generate bytecode of java file in the same folder with same file name but with .class extension. In our case, it generates Example.class file in Test folder.
Next step is to run your bytecode and see the output.
Open command prompt again and change directory to Test where .class file was generated.
Type java Example and hit enter. Please make sure that you do not type full qualified name of the file with .class extension.
Congratulations...you successfully wrote and run JAVA program with text editor on windows platform. You learned the first step in programming in JAVA.