groovy use groovyc -j java文件 groovy文件
this to compile the mix, but
When the java file that contains Chinese characters, the compiler will report GBK character cmd unrecognized, if it is Javac,
Then we only need to add -encoding utf-8
on the line, but groovyc --encoding coding problems still occur.
Finding relevant information is not good, this problem was the use of a characteristic of groovyc: -Jxxx = xxx pass parameters to the javac:
Resolve as follows:
groovyc -j UseAGroovyClass.java -Jencoding=utf-8 AGroovyClass.groovy