Write and execute Java Programs using TextPad tool

Pre-requisites -

  1. Install Java JDK as explained in the Install Java JDK
  2. Configure Java as explained in the Configure Java
  3. Understand the Simple Java Program explained in the A Simple Java Program
  4. Install TextPad editor tool as explained in the TextPad editor Installation
Please follow the below steps to write and execute Java programs using TextPad editor tool:

1. Launch TextPad editor tool as shown below:


2. Write any sample Java program in the editor tool as shown below:


3. Select 'Compile Java' option  from the Tools Menu -> External Tools Sub Menu (or you can also try Ctrl+1 shortcut key instead):



4. Ensure that the 'Sava As' dialog is displayed. In 'Save As' dialog, ensure that 'Save As Type' is selected as All Files , type 'Simple.java' into the 'File Name' field (Ensure that the class name you have mentioned in the above java program and the name you are giving here to save the Java file should match else the java program will throw an error i.e. class Simple in the java code and Simple.java while saving) and click on 'Save' button as shown below:



5. Repeat Step 3 to compile the saved Java file 
6. Select 'Run Java Application' option from the Tools Menu -> External Tools Sub Menu (or you can also try Ctrl+2 shortcut key instead)


7. Observe that the output of the above written Java program is displayed in the command window as shown below: