How to compile classes to JDK1.5 when ant is running in JDK1.6

旧巷老猫 提交于 2019-12-10 19:33:34

问题


My development environment is running in JDK1.6, and I need to compile some classes so they are compatible with a client running JDK1.5. How would I do this with the 'javac' ant target?


回答1:


Command line : javac -target 1.5 sourcefiles

Ant: < javac srcdir="${src} destdir="${build}" target="1.5" />




回答2:


<javac source="1.5"... />


来源:https://stackoverflow.com/questions/169044/how-to-compile-classes-to-jdk1-5-when-ant-is-running-in-jdk1-6

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