tsleyson
tsleyson

Reputation: 329

JDB: com.sun.tools.example.debug.expr.ParseException: Unknown operation: %

Whenever I try to evaluate something with the modulus operator (even something as simple as print 5 % 4) in JDB, I get the error message com.sun.tools.example.debug.expr.ParseException: Unknown operation: % and 5 % 4 = null.

It's only my second time using JDB, so I may be doing something wrong, but I can't find any guidance on what that might be. I definitely did compile my files with the -g option. It looks like a bug in JDB, except I can't find any bug report, and I can't imagine how such an obvious bug would have gotten through. I'm using JDB 1.6 and Java SE 1.7.0_11 under Windows 8. This error happens whether I run JDB from the Windows command prompt or from Cygwin.

Upvotes: 2

Views: 1913

Answers (1)

MrCujo
MrCujo

Reputation: 1333

If by now you haven't gotten an answer then here goes my suggestion, try compiling using -g: javac -g *.java and then try again to retrieve the value of whatever you need. It worked for me. Regards.

Upvotes: 5

Related Questions