Why does a big classpath throw "java.io.IOException: File name too long" Exception on Mac

As you haven’t shown us any code, we can only guess, but at least one clue is obvious. This exception is saying “Could not normalize path for file”, and the file value it specifies is obviously a classpath, not a file path. The final exception says “File name too long”. This obviously isn’t a file. It’s clear that you’re specifying a classpath value in a place where a file path should be specified.