How do I set the main Java type in Eclipse (latest)?
I have a main client, and then a bunch of unit tests that exercise various code paths and conditions. Normally I’d like to debug or execute the unit tests depending on the feature I’m developing. However, when the boss shows up, I’d like to quickly run my main driver class without hunting and pecking for the .java file, then hitting debug.
Is there an easy way to set/change the main type? How do folks normally handle running unit tests in Eclipse?
For unit tests :
You can make test suite so to bundle them by feature. This way you just need to run the test suite related to your feature.
Having several launch configuration :
Just go Run Configuration… or Debug Configuration … from Run menu and create the configuration you want. Next time you’ll want to Run them go again to that menu select it and click Run/Debug;
To gain time you can go to Keys configuration and set at shortcut to “Run…” or “Debug…” submenu.