I can add a JRE in classpath programatically using
entries.add(JavaRuntime.getDefaultJREContainerEntry());
where entries
is a classpathyentry. Anyone know how to do this for JUnit?
I can add a JRE in classpath programatically using
entries.add(JavaRuntime.getDefaultJREContainerEntry());
where entries
is a classpathyentry. Anyone know how to do this for JUnit?
Found this one
IClasspathEntry junit4Entry = BuildPathSupport.getJUnit4ClasspathEntry();
If I try
IClasspathEntry junit4Entry = BuildPathSupport.getJUnit4ClasspathEntry();
I get
Discouraged access: The type 'ClasspathEntry' is not API (restriction on required library /{path}/org.eclipse.jdt.core_3.10.0.v20140604-1726.jar')
So
IClasspathEntry junit4Entry = JavaCore.newContainerEntry(JUnitCore.JUNIT4_CONTAINER_PATH);
works better, no warnings ;)