Java: Can I run a given method in my program without invocating from main?
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.
精彩评论