I would like to compile my java program using gcc rather than using javac Because it can give out a more detail information compared to javac.
In my startup configuration. I use "make" to help me compile my program so I have to set the compiler for "make" first
I use this command to set the compiler to gcc automatically when the filetype is java. autocmd FileType java compiler gcc
But when I tried to compile my program using "make" It give out a lot of message that I don't understand, and it cannot compile the program.
However, When I first set the compiler to javac,then set it to gcc later. "make" works!!
- In my startup config : autocmd FileType java compiler javac
- When i am editing the file, :compiler gcc
Then I can compile my java program using make with gcc compiler
I don't know what the problem it is. Can I automatically set compiler to gcc instead of setting it later when editing the file ??