yipo
2/19/2013 - 6:44 AM

Why `javac' can't work in the Makefile? Solution: you don't have to double-quote paths in the variable PATH, even they have spaces.

Why `javac' can't work in the Makefile? Solution: you don't have to double-quote paths in the variable PATH, even they have spaces.

[Before]
'javac' is not recognized as an internal or external command,
operable program or batch file.
[After]
javac 1.7.0_13
[Makefile]
C:\Program Files (x86)\MacType\;C:\Windows\system32;C:\Windows;C:\Windows\System
32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MacTy
pe;C:\MinGW\bin;"C:\Program Files (x86)\Java\jdk1.7.0_13\bin"
---
javac -version
process_begin: CreateProcess(NULL, javac -version, ...) failed.
make (e=2): twC
mingw32-make: *** [all] Error 2
Press any key to continue . . .
all:
	@echo [Makefile]
	@echo %PATH%
	@echo ---
	javac -version

@ECHO OFF
CD /D %~dp0

ECHO [Before]
javac -version

PATH %PATH%;C:\MinGW\bin;C:\Program Files (x86)\Java\jdk1.7.0_13\bin

ECHO [After]
javac -version

mingw32-make
PAUSE