DEV Community

Cover image for Use notepad++ for java
CoderLegion
CoderLegion

Posted on • Updated on • Originally published at kodblems.com

Use notepad++ for java

Java, like many other programming languages, is written in plain text. So if you want to write and compile a Java script on your computer, you can use Notepad, the plain text editor. Java files are compiled when run through the Java runtime environment and therefore in Notepad all you need is to save the file correctly. Once created, it is opened from the command line via Java, and the script compiled.

Instructions
Click "Start", "All Programs", "Accessories", "Notepad".

Enter your Java code in Notepad.

Click "File", "Save As". Click the "Save as type" drop-down and select "All files."

Name your file and type ".java" to give it a java extension. Save this in the Java directory. Running this from the command line will compile the script on the fly.

Notepad ++ is a very versatile editor that can help us to program in multiple programming languages, even with code files or plain text that we want to modify thanks to its powerful regular expression engine. But this will not be the case for this post.

To configure Notepad ++ so that it can work with the Java machine, for this we must have the Oracle JDK distribution installed and configured correctly.

Guidelines
Once we have the editr open we go to the menu bar, and select the Run option

Once the option is open.

In the present case, it will be the compiler and the one that executes the Java program that we have created.

In the options, if we select one that conflicts with any that we already have, the same configurator will sing it to us.

If the error appears that the javac command is not recognized, we must see that in the system variables (path), we have the Java jdk / bin path configured well.

Hope this will help you.

Top comments (0)