
Setting up the C compiler doesn't look as clean as the Java compiler.I called this one "Compile C" since g++ will compile both C and C++. Open Plugins -> NppExec -> Execute and add another script.Execute the following to install the g++ compiler: mingw-get.exe install g++ Open your preferred command line interface (such as Command Prompt) and navigate to your MinGW folder, then navigate to the bin folder inside.

There is no need to install any shortcuts but you should install near the root of a drive, or at least at a path with no spaces. and it's a huge pain if you're not used to it. This program is a Windows alternative to Linux-style repository software management just for MinGW. If you have a compiler set up that you know how to use, please skip this section.

For this tutorial I will be demonstrating with MinGW, but other compilers such as Microsoft Visual C++ and Bloodshed Dev C++ have similar compiler parameters. If you have not already done so, download a C or C++ compiler.You will want to be able to run your code as well, so we will create an additional script the same way we did the last one, calling it "Compile and Run Java".Īgain, if javac.exe or java.exe aren't automatically found you need to place the absolute paths here instead. For example: C:\Program Files\Java\jdk1.8.0_60\bin\javac.exe. This is located in the "Program Files" folder under your primary (operating system) storage drive in most circumstances. If javac.exe is not found you may need to provide the full path to javac. If you have a Java source file open now, try running this script by going to execute again and running the script. Next, select Save, enter a name such as "Compile Java" and then select Save again. This will save your current document, make sure the current directory of the program is the current directory of your file, and then execute the javac compiler on your file. If NppExec installed successfully, you should see the menu option Plugins -> NppExec -> Execute., select it now.Restart your computer after this installation to enforce new environment variables. This will provide javac.exe which compiles java code. If you have not already done so, install Java SE Development Kit now from Oracle.Wait for the download to complete and accept all prompts. Once the list populates, find NppExec in the list of available plugins, check the box next to it, and select Install.Open Notepad++ and select Plugins -> Plugin Manager -> Show Plugin Manager from the header menu.
