我正在将我们的应用程序从 Java 8 升级到 Java 13。我们在构建过程中使用 Eclipse ECJ。为了让它工作,我们的 ant 脚本有:
<taskdef resource="net/jtools/classloadertask/antlib.xml" classpath="${build-helpers-lib.dir}/ant-classloadertask.jar" />
<classloader loader="project" classpath="${build-helpers-lib.dir}/ecj-4.13.jar" />
当 Ant 在 Java 13 下运行并出现以下错误时,这将失败:
15:50:06 classloader: started Tue Dec 10 15:50:06 PST 2019
15:50:06 WARNING: An illegal reflective access operation has occurred
15:50:06 WARNING: Illegal reflective access by org.apache.tools.ant.taskdefs.classloader.adapter.URLClassLoaderAdapter (file:/home/jenkins/jenkins/workspace/Metrix_2020_1/Metrix-AutomatedBuild/lib/ant-classloadertask.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
15:50:06 WARNING: Please consider reporting this to the maintainers of org.apache.tools.ant.taskdefs.classloader.adapter.URLClassLoaderAdapter
15:50:06 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
15:50:06 WARNING: All illegal access operations will be denied in a future release
15:50:06
15:50:06 classloader: finished Tue Dec 10 15:50:06 PST 2019 (57)
15:50:06
15:50:06 BUILD FAILED
任何解决方法的建议?