Eclipse – Installed Eclipse PDT, I do not have “Run As -> JUnit”

eclipsejunit

I installed Eclipse PDT and now I want to run a JUnit test in a Java project. The Java perspective is used, but there are no options displayed in the Run As menu item.

The "Run Configurations" item has the "launch new configuration" disabled.

The tests are JUnit4 (the project compiles with junit4.jar, but not with junit3.jar).

How can I get the "Run As -> JUnit" option?

Best Answer

If you take a look at the Galileo Packages Comparison page, you will see the Eclipse Php distro (the one with PDT features) does not include the JDT (Java Development Tools) features.

That means the "nature" of the projects you will create will not include "java" and any "Run as JUnit".

You would need to load another distro (like the J2EE one), and then include the PDT plugin on top of it, in order to have both.