Notepad++ is one of the favorite tools for programmer( for those who don't know what it is, click here notepad++).
However, it bothered me a lot since every time i wanted to compile a java code, i have to use MS-DOS commands. Though it provides the Run tool to execute external application, it didn't help.
Anyways, after scrambling, i managed to do it successfully with just one click :P
Here how i did
- First, you create a batch file "calljavac.bat" with the following content
CALL "C:\....\bin\javac.exe" %1
PAUSE
- Save "calljavac.bat" in your notepad++ folder (note the path "C:\...\bin\javac.exe" must be where you put "javac.exe" in your disk
- Now open notepad++
- Navigate to Run\Run... on the menu. Type this in the text field
$(NPP_DIRECTORY)\calljavac.bat $(FULL_CURRENT_PATH)
- Click Save to save it for using in the future, give it any name you want ( for me, I gave it "Compile Java")
- Set the combination of hot keys for it
- DONE
Now every time you finish coding you only have to go to "Run\Compile Java" on the menu.
Good luck ;-)