Reducing Java classpath in Eclipse Oxygen

1

I'm having problems with Eclipse Oxygen 4.7.3a when running Java JUnit tests. When trying to launch a test suite with JUnit run configuration, I get the following error:

Exception occurred executing command line. Cannot run program '..java-1.8.0-openjdk-1.8.0.161-1\bin\javaw.exe': CreateProcess error=206, The filename or extension is too long".

When I use the same run configuration in Debug mode, the test suite launches without issues. From this post, I got the impression that the problem is due to the classpath passed to javaw.exe being too long for the Windows command line to handle.

I'm having trouble figuring out where I could check what actually gets added into the classpath in Eclipse. Should I look for the project specific options by right-clicking the project and looking for "Build Path -> Configure Build Path -> Source" or from the Eclipse top-bar for "Window -> Preferences -> Java -> Build Path -> Classpath Variables"? I was thinking that if I could figure this out, I could maybe try to reduce the classpath.

I would be grateful if someone could point me to the right direction in this issue.

Jalopeura

Posted 2019-02-07T15:38:43.357

Reputation: 11

No answers