2

I get a:

Exception occurred executing command line.
CreateProcess

Cause by a too long commandline (too many libraries, too long path to the jars) when running from eclipse. The only solution for me is to go to run as configuration... then create a configuration, remove all default dependencies and manually add only the things which are required, so the commandline does not get cut off.

I normally do this for jUnit tests.

This is a waste of time, is there a different solution?

thanks

Toskan
  • 13,911
  • 14
  • 95
  • 185

2 Answers2

4

If you're on java >= 6 you can use classpath wildcards.

That should be enough unless you have your jars scattered around the filesystem, which would call for some cleanup.

edit

If you're simply running junit tests with run as junit test in eclipse then you can define 'user library' and add that to the classpath. Haven't tested it though, and it might suffer from some limits on environmental variable length in windows, but i think that's the safest bet.

edit2

You can try this plugin mentioned in this answer. It worked on indigo, so i guess it will work on helios.

Community
  • 1
  • 1
soulcheck
  • 36,297
  • 6
  • 91
  • 90
0

You can play around with forking settings - if you do not fork junit execution, you should be fine. However, classpath management in eclipse is a big mess - it does not separate production and test scopes.

Real alternative would be working maven build, which you should have, as eclipse is not a proper building tool - surefire plugin provides anough alternatives to overcome classpath environmen shortage.

Konstantin Pribluda
  • 12,329
  • 1
  • 30
  • 35