java 进一法,如何在Eclipse中进入一个核心的java类方法?

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.

解决方案

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值