This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Emma has an Eclipse plugin for running code in a workspace. Emma also allows you to instrument standalone code (like that deployed to a web application) and view the results. I don't know of a way to view those results in Eclipse.
Download Emma plugin from the internet. Place in your eclipse dropins folder. Restart the eclipse. Emma is used for Generating code coverage report. For this you need to write JunitTest cases.
Write few Junit test cases for you classs. After restarting Eclipse ( after dropping plugin), you can see one icon on eclipse near to debugger icon. Click on that icon, you will get the drop down of your Junit class what you have runned previously.