Notepad++ Configuration

Our Notepad++ configuration has slowly evolved as we started working with multiple Java files, enabled assertions, and will work with JUnit, objectdraw, and GridWorld. This entry tracks the latest and greatest settings. If you find yourself having Notepad++ configuration problems, look here for potential solutions.

We started the year invoking Notepad++ from a batch file that configured the path environment variable before starting the program. That way the operating system could locate javac and java. If we skip setting the path, then Notepad++ can be started from anywhere without the batch file. Setting the path is not necessary if we tell Notepad++ exactly where to find it. Tell it by substituting the values of your particular computer for [path to].

We're now also working with JUnit and Javadoc, so those are taken into account. The // Line # comments are to remind you what all needs to be on a single line even if this web page doesn't present one that way because of the fixed widths involved.

Compile Java (Ctrl+F11)

// Line 1

set JAVAC="[path to]\javac"

// Line 2

set JUNIT="[path to]\junit.jar"

// Line 3

set OBJECTDRAW="[path to]\objectdrawV1.1.2.jar"

// Line 4

$(JAVAC) -classpath "$(CURRENT_DIRECTORY)";$(JUNIT);$(OBJECTDRAW) "$(FULL_CURRENT_PATH)"

Run Java (Ctrl+F12)

// Line 1

set JAVA="[path to]\java"

// Line 2

set OBJECTDRAW="[path to]\objectdrawV1.1.2.jar"

// Line 3

$(JAVA) -ea -classpath "$(CURRENT_DIRECTORY)";$(OBJECTDRAW) $(NAME_PART)

Document Java (Ctrl+Shift+F11)

// Line 1

set JAVADOC="[path to]\javadoc"

// Line 2

set JUNIT="[path to]\junit.jar"

// Line 3

set OBJECTDRAW="[path to]\objectdrawV1.1.2.jar"

// Line 4

$(JAVADOC) -d "$(CURRENT_DIRECTORY)\doc" -classpath "$(CURRENT_DIRECTORY)";$(JUNIT);$(OBJECTDRAW) junit.swingui.TestRunner$() "$(FULL_CURRENT_PATH)"

Test Java (Ctrl+Shift+F12)

// Line 1

set JAVA="[path to]\java"

// Line 2

set JUNIT="[path to]\junit.jar"

// Line 3

set OBJECTDRAW="[path to]\objectdrawV1.1.2.jar"

// Line 4

$(JAVA) -ea -classpath "$(CURRENT_DIRECTORY)";$(JUNIT);$(OBJECTDRAW) junit.swingui.TestRunner $(NAME_PART)