开发者

Java: Can I run a given method in my program without invocating from main?

开发者 https://www.devze.com 2022-12-21 06:17 出处:网络
Is there a way to launch methods written in Java from开发者_高级运维 Eclipse without having to write all the driver code for it? I would like some effecient way of just right clicking a method, popula

Is there a way to launch methods written in Java from开发者_高级运维 Eclipse without having to write all the driver code for it? I would like some effecient way of just right clicking a method, populating it with params and feeding it a debugger.


The closest I can think of is the "scrap page" in eclipse. Don't think you can debug though.

If I were you, I'd use moreUnit plugin + JUnit (+ preferably maven). That way, you can not only write some tests quickly, but they will be organized so that you can have a nice unit test battery afterwards...


This is not part of any standard eclipse plugin that comes in the stock package.

0

精彩评论

暂无评论...
验证码 换一张
取 消