简体   繁体   English

在ant脚本的JAVAC标记中,debug属性的值可以为“ on”

[英]debug attribute can have values as “on” in JAVAC tag of ant script

I am a little confused. 我有点困惑。 Can someone please help with the below doubt 有人可以解决以下疑问吗

I am writing an ant script which will compile a java code and deploy the files. 我正在编写一个蚂蚁脚本,它将编译Java代码并部署文件。 Please note that in the javac tag i have added an attribute debug="on" . 请注意,在javac标记中,我添加了一个属性debug =“ on” As per the docs leagle values for debug are true or false (not on and off ). 根据docs的leagle调试值,是true或false (不是on和off )。

As far as i know, debug will links Java code back to the line number, the variable name in the source, and the name of the source itself (using debuglevel attribute). 据我所知,debug会将Java代码链接回行号,源中的变量名以及源本身的名称(使用debuglevel属性)。

Out of curiocity i added debug="on" and thought that i will receive "Unknown source" in the stack trade instead of line number but instead i am receiving correct stack trace with line number. 出于好奇,我添加了debug =“ on”,并认为我将在堆栈交易中收到“未知来源”而不是行号,但是我收到的是带有行号的正确堆栈跟踪。

Questin: is my understanding of debug attribut uncorrect. Questin:是我对调试属性的理解不正确。 If yes, can you please help me with it? 如果是,您能帮我吗?

Pasted below is the edited stack trade. 下面粘贴的是已编辑的堆栈交易。 i am getting the same for both debug=true and debug=on. 我在debug = true和debug = on上都得到相同的结果。

> javax.naming.CommunicationException: Failed to connect to server
> localhost:1099 [Root exception is
> javax.naming.ServiceUnavailableException: Failed to connect to server
> localhost:1099 [Root exception is java.net.ConnectException:
> Connection refused: connect]]     at
> org.jnp.interfaces.NamingContext.getServer(NamingContext.java:216)    at
> org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1116)    at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)   at
> org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)   at
> javax.naming.InitialContext.lookup(InitialContext.java:392)   at
> com.XXXXX.products.fi.mbs.server.someclass2.<init>(someclass2.java:85)
>   at
> com.XXXXX.products.eurorepo.server.someclass1.<init>(someclass1.java:21)
>   at
> com.XXXXX.products.eurorepo.server.boot.someclass3.registerFactories(someclass3.java:136)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)     at
> com.XXXXX.products.common.someclass4.callMethod(someclass4.java:154)
>   at
> com.XXXXX.products.server.someclass5.callMethod(someclass5.java:118)
>   at
> com.XXXXX.products.common.someclass4.callMethod(someclass4.java:141)
>   at
> com.XXXXX.products.server.someclass5.registerFactories(someclass5.java:48)
>   at com.XXXXX.cs.yyy.yyyServer.init(yyyServer.java:292)  at
> com.XXXXX.cs.yyy.yyyServer.<init>(yyyServer.java:135)     at
> com.XXXXX.cs.yyy.yyyServer.bootyyyServer(yyyServer.java:494)  at
> com.XXXXX.cs.yyy.yyyServer.main(yyyServer.java:691)   at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)     at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: javax.naming.ServiceUnavailableException: Failed to connect
> to server localhost:1099 [Root exception is java.net.ConnectException:
> Connection refused: connect]  at
> org.jnp.interfaces.NamingContext.getServer(NamingContext.java:191)
>   ... 24 more Caused by: java.net.ConnectException: Connection refused:
> connect   at java.net.PlainSocketImpl.socketConnect(Native Method)    at
> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)  at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
>   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)   at
> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)    at
> java.net.Socket.connect(Socket.java:529)  at
> java.net.Socket.connect(Socket.java:478)  at
> java.net.Socket.<init>(Socket.java:375)   at
> java.net.Socket.<init>(Socket.java:276)   at
> org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
>   at
> org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
>   at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:187)

Well thanks to a post in stackoverflow and this i figured out the answer. 那么由于在后计算器这个我想出答案。 Yes, ON/OFF can be interchanged with true/false. 是的,ON / OFF可以与true / false互换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM