How to overcome Windows environment restrictions?

In my build I have a task that forks a new Java process and extracts some class informations from other sub projects built in former step. Because I have about 90 subprojects with a lot of 3rd party dependencies the classpath for this new Java process becomes huge (not at last because the path to the 3rd party jars residing in Gradle cache makes the whole thing exploding).

Is there a way to not use the Windows environment for setting the classpath on the new Java process?

Hello, I can think of two workarounds for the path limit problem on windows.

  1. copy all the jars you want in your java process into a dedicated folder and just point to that folder.

  2. create a startup jar that contains nothing but a that contains a hardcoded list of the classpath entries

cheers, René