Just Learn Code

Enhancing Notepad++ with NppExec: A Powerful Plugin for Developers

Notepad++ is a free source code editor for Windows that provides developers with an efficient and reliable tool for editing, formatting, and managing code. The Notepad++ text editor supports various programming languages and is enhanced by numerous plugins.

In this article, we will explore two essential topics: Running Java Programs in Notepad++ and Notepad++ Plugins. Running Java Programs in Notepad++

Java is an object-oriented programming language that is used to develop a wide range of applications, from mobile apps to enterprise-level systems.

Notepad++ can be used to edit and run Java programs with the following steps:

Installing Prerequisites

The first step is to install the Java Development Kit (JDK), which includes Java Runtime Environment (JRE), Java Virtual Machine (JVM), and other Java development tools. The JDK can be downloaded from Oracle’s website, and the installation process is straightforward.

Installing NppExec Plugin in Notepad++

The next step is to install the NppExec plugin, which allows running commands in the console window of Notepad++. To install NppExec, go to the Plugins menu and select Plugin Manager.

In the list of available plugins, select NppExec and click Install. After the installation, a new menu item, NppExec, will be added to the Plugins menu.

Setting Environment Variables

Environmental variables are variables that are defined in the operating system, which various programs can access. To set the environment variables, right-click My Computer, select Properties, and click Advanced System Settings.

In the Advanced tab, click on Environment Variables. In the System Variables section, click New, and enter the following:

Variable name: JAVA_HOME

Variable value: C:Program FilesJavajdk1.8.0_161 (Replace it with your Java folder’s location)

Running Java Program on Notepad++

Now that the environment is set up, let’s write a Java program and run it on Notepad++.

Open Notepad++ and create a new document. Type the following code:

public class Hello{

public static void main (String[] args){

System.out.println(“Hello, World!”);



Save the file with the extension .java.

Go to Plugins -> NppExec -> Execute, and a console window will appear at the bottom of the Notepad++ window. Type in the following command:

javac $(FILE_NAME)

If you see no errors, type in the following command:

java $(NAME_PART)

And you will see the text “Hello, World!” printed out.

The $(FILE_NAME) and $(NAME_PART) are NppExec’s variables. Notepad++ Plugins

Notepad++ provides a wide range of plugins that enhance the default functionality of the text editor.

Here are some plugins that not only make coding easier but fun!to Notepad++ Plugins

Before we delve into the plugins, let’s have an overview of what plugins are. Plugins are add-ons that can be integrated into Notepad++ to extend its functionality.

These plugins provide new features and tools to enhance the text editor’s capabilities. Installing Plugins in Notepad++

To install plugins in Notepad++, open the Plugin Manager from the Plugins menu.

In the Available tab, you can browse the list of plugins that you want to install and click on Install. The new plugin will be downloaded and installed automatically.

Benefits of Using Plugins in Notepad++

There are several benefits of using plugins in Notepad++. Firstly, plugins provide additional features and tools that are not available in the default version.

For example, the FTP Synchronize plugin allows you to synchronize a local file with a remote server. Secondly, plugins can automate repetitive tasks, which saves time and effort.

For example, the TextFX plugin provides various text transformation options, such as sorting and character case conversion. Finally, plugins make coding more fun and personalized.

For example, the Theme Manager plugin allows you to customize the theme of the Notepad++ interface.


Notepad++ is an excellent text editor that offers various features for developers. By using the NppExec plugin, developers can easily write and run Java programs within Notepad++ itself.

Additionally, various plugins extend the default functionality of Notepad++, providing a much more personalized and feature-rich experience. Overall, mastering Notepad++ and its plugins will make coding much more comfortable and fun!

Notepad++ is a popular source code editor that can be customized with plugins.

One of the most versatile plugins for Notepad++ is NppExec, which provides the ability to execute commands from within Notepad++ and automate repetitive tasks. In this article, we will explore NppExec in more detail, including its features, installation and setup, and how to use it to run different language programs.

Overview of NppExec Plugin in Notepad++

NppExec is a powerful plugin that enhances the functionality of Notepad++. It helps to simplify task automation, command execution, and customization of the text editor.

With NppExec, you can execute commands directly from within the editor, switch between different commands or scripts, and even create custom commands to run custom scripts.

Features Provided by NppExec Plugin

NppExec provides a range of features that makes automation of tasks much easier. These features include:


Access to the Common Console

When NppExec is installed, it brings with it the Common Console, which is an excellent tool for developers. It allows you to execute commands and view the output in real-time within Notepad++ itself.

2. Custom Commands

NppExec allows you to create custom commands that can be executed with a single click.

This feature is particularly helpful in automating repetitive tasks, saving you time and effort. 3.

Interactive Commands

With interactive commands, NppExec provides an easy way to interact with the user. For instance, you can create a script that will prompt the user for input.

4. Multiple Commands

NppExec allows you to create multiple commands within the same script using the START command, which runs each command in a separate console window.

Installation and Setup of NppExec Plugin

Before installing NppExec, ensure that you have the latest version of Notepad++ installed. To install NppExec, follow the steps below:


Go to the Plugin Manager and click the “Show Plugin Manager” option. 2.

In the list of plugins, search for NppExec and click the “Install” button. 3.

Once installed, the NppExec plugin will enable you to execute commands, scripts, and batch files within Notepad++. After installing NppExec, you need to follow a few steps to set it up:


Open the NppExec console by navigating to Plugins in the menu bar, then selecting NppExec -> Execute. 2.

In the NppExec console window, click the gear icon, then go to Advanced Options. 3.

Type the following code: echo NppExec is working!

4. Click on the Save and Close button and name the configuration.

5. Now, to run the test, navigate to Plugins -> NppExec -> Execute and choose the configuration from the list.

The commands you enter into the NppExec console window will be executed immediately. You can now start customizing the plugin to suit your needs.

Steps to Run Different Language Programs with NppExec Plugin

NppExec is flexible enough to run commands for different programming languages, such as C++, Python, Ruby, and Java programs. Here’s how to run different language scripts with NppExec:


Running C++ Scripts:

To run C++ scripts, confirm whether MinGW is installed on your system. If not, install it from the official website.

Open Notepad++, go to the Plugins menu, and select NppExec -> Console commands. In the Console window that opens, enter the following commands:

set gpp_path=C:MinGWbin



Running Python Scripts:

To run Python scripts, go to the Plugins menu and select NppExec -> Console commands, then run the following commands:

set python_path=C:Python27

“$(python_path)python.exe” “$(FULL_CURRENT_PATH)”

3. Running Ruby Scripts:

To run Ruby scripts, go to the Plugins menu and select NppExec -> Console commands, then run the following command:



Running Java Programs:

To run Java programs, ensure that you have successfully configured your Java environment variables, as discussed earlier. Open a new document, write the code, and save the file with the extension “.java.” Then, go to the NppExec console and enter the following commands:

javac $(FILE_NAME)

java $(NAME_PART)


NppExec is a powerful plugin that enhances the functionality of Notepad++, making it easier for developers to automate repetitive tasks, execute commands, and run scripts. The plugin’s Custom Commands feature enables developers to create custom commands and execute them with a single click, while Interactive Commands allow users to interact with the console to provide input.

With NppExec, the process of running different language scripts is hassle-free, thanks to its compatibility with a wide range of programming languages. By installing NppExec and following the steps provided, you can take full advantage of its features to enhance your coding experience.

In conclusion, the NppExec plugin is an incredibly useful tool that enhances the functionality of Notepad++, making it easier for developers to automate mundane tasks, execute commands, and run scripts. Its features include access to the Common Console, the ability to create custom commands, and the ability to run commands for different programming languages, such as C++, Python, Ruby, and Java programs.

By installing NppExec and following the steps provided in this article, developers can streamline their workflow, save time, and ultimately increase their productivity. The importance of NppExec should not be underestimated, and it’s a valuable tool that every Notepad++ user should consider using.

Popular Posts