ant 编译,java jdk版本为jdk1.6.0_03问题

ttmmei 2008-04-09 02:06:00
我用ant编译,项目对应的java jdk版本为jdk1.6.0_03
检查build.xml也没有问题,用ant编译,报错如下。不知是什么原因,烦指点下。多谢!
[javac] javac: invalid target release: 1.5
[javac] Usage: javac <options> <source files>
[javac] where possible options include:
[javac] -g Generate all debugging info
[javac] -g:none Generate no debugging info
[javac] -g:{lines,vars,source} Generate only some debugging info
[javac] -nowarn Generate no warnings
[javac] -verbose Output messages about what the compiler is doing
[javac] -deprecation Output source locations where deprecated APIs are used
[javac] -classpath <path> Specify where to find user class files
[javac] -sourcepath <path> Specify where to find input source files

[javac] -bootclasspath <path> Override location of bootstrap class files
[javac] -extdirs <dirs> Override location of installed extensions
[javac] -d <directory> Specify where to place generated class files
[javac] -encoding <encoding> Specify character encoding used by source files
[javac] -source <release> Provide source compatibility with specified release
[javac] -target <release> Generate class files for specific VM version
[javac] -help Print a synopsis of standard options

...全文
699 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
aumy2008 2009-12-14
  • 打赏
  • 举报
回复
我也遇到过,环境变量中的java版本和ant中的不一致,更改环境变量的版本,然后重启编辑环境,运行就可以了。
schumiXsuse 2008-04-09
  • 打赏
  • 举报
回复
版本不对吧

67,549

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧