Accepted answer

turns out that it was because i was extending testcase which makes the junit runner think it is still version 3. even if you tell it to use version 4.


i am not sure this is linked at all to some kind of os length limitation, but rather to:

  • some hard-coded parametrization based on the name of the class.
  • or to some problem with the source folder.
    indeed, you message looks like:

alt text

from quicktip: junit: the input type of the launch configuration does not exist

if you are getting the above error message in eclipse ide, while running your test case, just make sure that you have the test class as a part of the “eclipse source folder” definition.

easiest way. right click on the folder –> build path –>use as source folder

there could be a length limit issue (you can see some projects undergoing a refactoring "to be under the file length limit" (org.eclipse.jdt.core.tests.performance).

but that is strange, considering the length limit on windows are:

  • 32767 characters for the maximum command line length for the createprocess function. this limitation comes from the unicode_string structure. createprocess is the core function for creating processes, so if you are talking directly to win32, then that's the only limit you have to worry about. but if you are reaching createprocess by some other means, then the path you travel through may have other limits.
  • 8192 character command line length limit imposed by cmd.exe.
  • 2048 length due to the internet_max_url_length (around 2048) command line length limit imposed by the shellexecute/ex functions. (if you are running on windows 95, then the limit is only max_path.)
  • 32767 characters for the maximum size of your environment (includes the all the variable names plus all the values)

maybe the total length of the javac command does exceed one of those limits, and fail to compile one of those junit java classes, meaning it can no longer be executed (and trigger the above error message)


check your run configuration under run -> run... your test has a configuration there. check the "test class" field.


by default i believe the junit runners are set to look for *test files, so it will filter out testcase. people often use *testcase as a base class without any tests of its own. not sure if that's what you're running into. if so, it's configurable in the runner.

Related Query

More Query from same tag