Passing “-J-Duser.language” into javac through ant to ensure compilation errors are reported in the correct language

筅森魡賤 提交于 2019-11-29 15:22:05

Try adding a <compilerarg> to your <javac> call. For example:

<javac srcdir="${src.dir}" destdir="${classes.dir}" fork="true">
    <compilerarg value="-J-Duser.language=en"/>
    <compilerarg value="-J-Duser.country=GB"/>
</javac> 

EDIT Fixed the arg values. Also, this only works if the compiler is forked; I updated the example to reflect that.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!