I have a problem when i try to run JUnit test class in Eclipse.
Exception occurred executing command line. Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:\Users\User\Documents\Projects\MyProject"): CreateProcess error=206, The filename or extension is too long
After I received this error I started to search how to fix the problem... However now I generated MANIFEST file that contains all of the jars that i need, but I don't know how to pass the new manifest file to the project and also what to do with the jars in my lib dir?
Thanks in advance!
EDIT:
I have SimpleTest class and TestRunner class
public class SimpleTest {
@Test
public void testAssertions() {
String str1 = new String ("abc");
String str2 = new String ("abc");
assertEquals(str1, str2);
}
}
package com.epb.junit;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
public class TestRunner {
public static void main(String[] args) {
Result result = JUnitCore.runClasses(SimpleTest.class);
for (Failure failure : result.getFailures()) {
System.out.println(failure.toString());
}
System.out.println(result.wasSuccessful());
}
}
Nothing interesting here, I just need to know how to pack all of my JAR files which I am using, because they are too many... I made a manifest file with all of them but I don't know how to pass it instead of JAR files.
P.S I am running the test class with Eclipse -> Run As -> JUnit Test option. After the error occured I've made this TestRunner class and I am running it as Java Application but still Error 206. From the things that I read I realized that my Build Path is too long, because there are a lot of JARS so now I'm looking to find a way to shorten this Path and to pack the jars into one. I've tried to export the lib folder into Jar file but it doesn't worked.
EDIT 2
The last thing that I tried just before a moment is to create a "pathing jar" which contains only Manifest.mf file inside it. I put this jar in my project Build Path instead of all other Jars but still no result... now the project has errors for the Built Path...