Last active
December 13, 2015 22:19
-
-
Save yipo/4983625 to your computer and use it in GitHub Desktop.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
@echo [Makefile] | |
@echo %PATH% | |
@echo --- | |
javac -version | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 . . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment