蚂蚁的classpath订单 [英] Ant classpath Order

查看:210
本文介绍了蚂蚁的classpath订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置在蚁类路径顺序怎么办?

How do I set the classpath order in ant?

具体而言,当我尝试运行我的Ant构建,我需要它拿起一个罐子(​​JAXWS-api.jar文件)的一类,而不是它是JRE中的同一类。我目前设置classpath中明确包括那些罐子但它似乎仍然拿起JRE第一。我所寻找的是某种类型相当于在eclipse订购/导出构建配置菜单下。

Specifically, When I am trying to run my ant build, I need it to pick up a class in a jar (jaxws-api.jar) instead of the same class which is in the jre. I am currently setting the classpath to explicitly include those jars however it seems to still pick up the jre first. What I am looking for is some type of equivalent to Order/Export in eclipse under the "Build Configuration" menu.

编辑:我会更加明确。我有一个用CXF 2.1.3生成一些类。他们呼吁javax.xml.ws.Service#的getPort(的QName,类,WebServiceFeature ...)。我使用的Java版本02年6月1日。此方法不会在该版本类存在。然而,它在JAXWS的类版本(及更高版本的JRE类)确实存在。当我尝试做Ant构建中,JRE类总是JAXWS版本之前拿起第一。这使我的编译失败。如何修改我的类路径中去年把JRE?

I'll be more explicit. I have some classes which were generated with CXF 2.1.3. They call javax.xml.ws.Service#getPort(QName, Class, WebServiceFeature...). I am using Java version 1.6.02. This method does not exist in that class in that version. However, it does exist in the jaxws version of the class (and later versions of the JRE class). When I try to do an ant build, the JRE class is always picked up first before the jaxws version. This makes my compilation fail. How can I modify my classpath to put the JRE last?

我无法改变的JRE版本,所以请不要认为因为一个修复,除非它是唯一可能的。

I can't change the JRE version, so please don't suggest that as a fix unless it is the only possible one.

推荐答案

看起来你需要使用的的启动类路径设置:// ant.apache.org/manual/Tasks/javac.html相对=nofollow> javac的或的 Java的的Ant任务。

Looks like you need to use the bootclasspath setting in the Javac or Java Ant task.

您总是可以做蚂蚁-v 来得到你的Ant构建的详细输出。

You can always do ant -v to get verbose output of your Ant build.

这篇关于蚂蚁的classpath订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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