Java Tutorial – How to write, compile and run Java programs all within Notepad++

///Java Tutorial – How to write, compile and run Java programs all within Notepad++

Java Tutorial – How to write, compile and run Java programs all within Notepad++

FavoriteLoadingAdd to favorites

How to write, compile and run Java programs all within Notepad++.

Java468x60

This is a short video tutorial to illustrate the steps required to configure the Notepad++ editor on Windows so as to allow you to write, compile and run a Java program all within the Notepad++ editor and consequently, not having to use the command prompt. The major benefits to be obtained is a quicker Java development lifecycle and an accelerated learning process as you progress in learning Java.

In this video I am using Windows 7 but these steps will work equally well for Windows 8, 8.1 and Windows 10. This video tutorial assumes you have already downloaded and installed the Notepad++ editor on your computer (if you have not, please watch this video This video tutorial also assumes you have already downloaded and installed the Java JDK.

For your convenience, I am including below the commands required by the NppExec plugin (explained in the video).

NPP_SAVE
cd $(CURRENT_DIRECTORY)
c:javajdk180binjavac $(FILE_NAME)
c:javajdk180binjava $(NAME_PART)

Note: the full path to my Java installation folder is c:javajdk180. You may have installed the Oracle Java JDK into a different location, hence your full pathname may be different. I have added one additional command that is not in the video – NPP_SAVE. This command tells the NppExec plugin to save the current Java source file being edited before attempting to compile and run it. Thus, it eliminates the requirement to save the Java source file each time you wish to compile it.

There is a deeper motivation behind this video. Briefly, in 1984 David Kolb published what is considered a ground breaking book called Experiential Learning: experience as the source of learning and development. It facilitates an accelerated learning lifecycle. Feedback that is received sooner and more frequently allows for corrective action to be taken at an earlier stage in the learning process, and hence leads not only to better learning outcomes, but more learning outcomes in less time. Thus, it is win-win situation. This is the pedagogical reasoning underlying my motivation to make this video tutorial – to help you learn more and better in less time. I hope it may be of assistance to you.

WATCH SOME MORE JAVA TUTORIALS

Enhanced For Loop Explained and Illustrated

For Loops Explained and Common Pitfalls Highlighted

How to use the Shortcut Operators

How to use the Conditional Operator ( ? : )

Compare Objects – Equality Operator Vs Equals Method

Passing by Value (Object References)

Command Line Arguments

How To Write A Method Part II

How To Write A Method Part I

Passing by Value (Primitive Data Types)

Division and Modulo Operators Explained

Operator Precedence Explained

What are Data Types, Variables and Constants?

How to use Nested If Statements

How to use simple If Statements

What are Control Flow Statements

How to Write, compile and run your first Java program on Windows

How to download and install the Notepad++ editor on Windows

source

By |2019-05-24T19:10:28+00:00May 24th, 2019|Java Video Tutorials|8 Comments

8 Comments

  1. n7na May 24, 2019 at 7:10 pm - Reply

    Hello Martin. You are my favorite professor I will strive to follow you up to your level. Thank you

  2. Satish Patel May 24, 2019 at 7:10 pm - Reply

    Great.. Thanks Millions…. Keep it up…one issue what to do in case of Parent and Child class and when we want to run Child class and not Parent class.. how to do this?..

  3. Saif ur Rehman May 24, 2019 at 7:10 pm - Reply

    thank you so much sir.
    Love from Pakistan

  4. Outsydah May 24, 2019 at 7:10 pm - Reply

    Hello Martin. Today you are my very own Genius dude. Thank you a million times over!!!!!!

  5. MCUbetterthenDCU May 24, 2019 at 7:10 pm - Reply

    i cant find any java file in C:Program Files (x86)…..do i need to download java or eclipse separately ?

  6. abhay rohit May 24, 2019 at 7:10 pm - Reply

    Thank you so much for all cmds are working but marco shortcut is not working.
    I have selected compile and run marco as ctrl 1 and 2 as you say but when I pressed ctrl + 1 it is not working. I mean say that macro are working but the shortcuts are not working please help me

  7. Fukoff Checkoff May 24, 2019 at 7:10 pm - Reply

    had the GIT JDK now got notepad++. going to try your methods to convert a qbasic.exe into a JAVA program. thanks for the video, one of the best of so many i search thur

  8. Rami-John Fares May 24, 2019 at 7:10 pm - Reply

    Thank you for the vid

Leave A Comment

*