Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Launching JUnit tests using argument file


I'm investigating an issue with launching JUnit tests in our code base after switching to JDK 11:

Launching JUnit tests started failing because the launch config arguments become too large for the OS to handle as command line arguments. I've implemented a simple shortener which will write the command line arguments into an argument file and use this one for launching. That solves the issue.

I appreciate any feedback on the patches if the proposed changes are acceptable or if a different solution is preferred. There are a few options and I'm happy to implement a different solution if desired.

FWIW, I'm also investigating why the argument list becomes so large. It looks like that Eclipse is collecting JDK specific options from the project classpath and combining it with all JVM specific options from the dependencies. In our case this leads to duplicate "--add-export" statements in the arguments list. I was wondering if the code should also be modified to wither avoid duplicate arguments on the command line or ignore JVM options from other projects in the dependencies. Any pointers are appreciated!


Gunnar Wagenknecht

Back to the top