why jdb won't recognize the “Integer” class?

不羁的心 提交于 2019-12-11 02:14:15

问题


I connect like this:

$ jdb -connect com.sun.jdi.SocketAttach:hostname=x.x.x.x,port=8008

In the jdb prompt I do this:

> stop in com.me.some.Gizmo.function

Then it breaks correctly, but when I do this:

> print Integer.parseInt("4")

It outputs this:

com.sun.tools.example.debug.expr.ParseException: Name unknown: java.lang.Integer

Why on earth can't jdb recognize the "Integer" class??


回答1:


Although java allows classes from the package java.lang to be referenced without the fully qualified name, JDB does not.

> print java.lang.Integer.parseInt("4")

should work.



来源:https://stackoverflow.com/questions/14130892/why-jdb-wont-recognize-the-integer-class

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!