简体   繁体   中英

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

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??

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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