当ant在JDK1.6中运行时,如何将类编译为JDK1.5 [英] How to compile classes to JDK1.5 when ant is running in JDK1.6

查看:366
本文介绍了当ant在JDK1.6中运行时,如何将类编译为JDK1.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的开发环境在JDK1.6中运行,我需要编译一些类,以使它们与运行JDK1.5的客户端兼容。我如何使用'javac'ant目标?

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?

推荐答案

命令行:javac -target 1.5 sourcefiles

Command line : javac -target 1.5 sourcefiles

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

这篇关于当ant在JDK1.6中运行时,如何将类编译为JDK1.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆