Rushy Panchal
Rushy Panchal

Reputation: 17552

Setup Notepad++ for Java

To use Notepad++ for Java, I created a batch file to compile and run the file:

@ECHO OFF
C:\Program Files\Java\jdk1.7.0_17\bin\javac.exe %1
C:\Program Files\Java\jdk1.7.0_17\bin\java.exe %1
echo.
PAUSE
@ECHO ON

Then to run it, in the Notepad++ 'Run' prompt (F5), I typed in: C:\Program Files\Java\java.bat "$(FULL_CURRENT_PATH)". All the file paths are correct, but nothing happens when I press "Run". How can I fix this? Thanks!

Upvotes: 1

Views: 1124

Answers (2)

Franklin
Franklin

Reputation: 1801

Put "" around the executable so it knows to include spaces as oppose to treating the spaces as separators.

@ECHO OFF
"C:\Program Files\Java\jdk1.7.0_17\bin\javac.exe" %1
"C:\Program Files\Java\jdk1.7.0_17\bin\java.exe" %1
echo.
PAUSE
@ECHO ON

Upvotes: 6

Magoo
Magoo

Reputation: 80211

Enclose the ENTIRE executable names in "quotes" since SPACES are seen as separators.

Upvotes: 5

Related Questions