I am trying to debug java source code, for this I am using JDK's rt.jar
. I am stepping into source code while debuging
ex:-
Map m = new HashMap();
m.put(10, "abc");
I placed brakepoint
for m.put()
and stepping into the sourcecode of put()
method in HashMap
but I am unable to see values for key and value
which I am passing. The problem is rt.jar
has given without debuginfo
for this we have to compile the source code
.
I am trying to compile the source code
according to this post
debug jdk source can't watch variable what it is
But while compiling below line
javac -J-Xms16m -J-Xmx1024m -sourcepath "D:\etr\java\debug\jdk_source" -cp "D:\etr\java\debug\rt.jar" -d "D:\etr\java\debug\jdk_debug" -g @filelist.txt >> log.txt 2>&1
I am getting the below error in log.txt
javac: invalid flag: D:\etr\java\java
Usage: javac <options> <source files>
use -help for a list of possible options
Can anyone help me how to fix the above issue.