debug 属性可以在 ant 脚本的 JAVAC 标记中具有"on"的值



我有点糊涂了。有人能帮我解决下面的疑问吗

我正在编写一个ant脚本,它将编译java代码并部署文件。请注意,在javac标签中,我添加了一个属性debug="on"。根据文档,调试的legle值是true或false(不是on和off)。

据我所知,调试将把Java代码链接回行号、源代码中的变量名和源代码本身的名称(使用debuglevel属性)。

出于好奇,我添加了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)

多亏了stackoverflow上的一篇文章,我找到了答案。是,ON/OFF可以与true/false互换

相关内容

  • 没有找到相关文章

最新更新