I have a problem when I try to run a JUnit test class in Eclipse.
An error occurred while executing the command line. Cannot start the program "C: \ Program Files \ Java \ jre7 \ bin \ javaw.exe" (in the directory "C: \ Users \ User \ Documents \ Projects \ MyProject"): Error CreateProcess = 206, file name or extension too long
After I got this error, I started looking for how to fix this problem ... However, now I have created a MANIFEST file containing all the banks I need, but I do not know how to transfer the new manifest file to the project, and also what to do with banks in my catalog?
Thanks in advance!
EDIT:
I have a SimpleTest class and a 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 my JAR files that I use because there are too many of them ... I made a manifest file with all of them, but I donβt know how to transfer it instead of JAR files.
PS I am running a test class with the parameter Eclipse -> Run As -> JUnit Test. After an error occurred, I made this TestRunner class, and I run it as a Java application, but still error 206. From what 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 pack banks in one. I tried to export the lib folder to a Jar file, but that didn't work.
EDIT 2
The last thing I tried for almost a moment was to create an "empty jar" containing only the Manifest.mf file in it. I put this jar in my Build Path project instead of all the other Jars, but still no result ... now the project has errors for the path built ...
source share