Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I step into a core java class method in Eclipse?

Hi I am going to dig a little more in Java so I would like to see how the program executed in the core class. For example, I would like to know how String.chatAt() is implemented, so I set breakpoint and tried to step into with debug mode. But I failed, I set bp at the second line when the program hit it, I used step into it still continue to the third line.

String a = "1231231241241";
char b = a.charAt(0);
System.out.println(b);

I think it should go into the source and show "no source found" and then give me a chance to attach the source file, right? But why it cannot get in? I can only use ctrl+right click on a method to get into source and attach.

like image 873
user1722361 Avatar asked Oct 05 '12 08:10

user1722361


1 Answers

It might be that your Eclipse is not setup to run with JDK, it might run with JRE instead.
Check this link.
Also, I might suggest you to try and use Maven for your Java projects management, it makes the life so much easier, when you get a grasp of it.

like image 98
Less Avatar answered Oct 03 '22 23:10

Less