Lorem ipsum dolor sit amet, consectetur adipiscing elit. Test link

How to Compile and Run Java Program by Notepad

  1. Image titled Compile and Run Java Program by Notepad Step 1
    1
    Create a class named as Calculator.This is just an example. You can create any class you want to create.
  2. Image titled Compile and Run Java Program by Notepad Step 2
    2
    Save class Calculator as a Java file.Notice that it must be in Java format. Otherwise, it will fail to compile.
  3. Image titled Compile and Run Java Program by Notepad Step 3
    3
    Name it as Calculator.java on the desktop. Alternatively, you can save it anywhere you want.
  4. Image titled Compile and Run Java Program by Notepad Step 4
    4
    Open Plugins in the menu bar. Then choose "Show Plugin Manager".
  5. Image titled Compile and Run Java Program by Notepad Step 5
    5
    Find Nppexec and click it in the options list-box.
  6. Image titled Compile and Run Java Program by Notepad Step 6
    6
    Restart Notepad according to the instructions provided by the popup.
  7. Image titled Compile and Run Java Program by Notepad Step 7
    7
    In the menu bar, choose Plugin->Nppexec->Execute.
  8. Image titled Compile and Run Java Program by Notepad Step 8
    8
    In the command line, type: cd C:\Users\hhh\Desktop\Calculator.java, javac Calculator, java Calculator, and press enter after each command.
    • The format means cd $(CURRENT_DIRECTORY) , javac $(FILE_NAME) ,java $(NAME_PART).
  9. Image titled Compile and Run Java Program by Notepad Step 9
    9
    Click OK , the program will compile and run. You can see the demonstration. It is a cool calculator, right?

Post a Comment

© SGR MAG TEST. All rights reserved. Developed by Jago Desain