runtime-suite
runtime-suite copied to clipboard
ClassFinders with different classpathes
Will it be possible to write ClassFinders with different classpathes?
The problem is that under Windows the classpath is restrited to something like 2048 characters, so if you want to run all unit-tests in different projects one cannot simply write a ClassFinder that finds all unit-tests in the classpath. A frequent and currently unresolved issue in huge projects (consisting of 50+ test projects).
Nothing in the current runtime-suite ever adds anything to the classpath, it only finds things on the classpath.
I don't know how to add classes to the classpath. A quick google search suggests that it is possible, but I have not done it. https://www.google.com/search?q=java+how+to+add+classes+to+classpath+at+runtime&oq=java+how+to+add+classes+to+classpath+at+runtime
Given some of those internet ideas, I suspect you could write a ClassFinder that could find classes outside the current JVM's classpath and add them.
In my ignorance of doing Java on Windows, I wonder if another approach would also work: Put unit tests into smaller projects with smaller classpaths. If they truly are unit tests, perhaps they don't depend on all 2048+ characters' worth of dependencies.