Comment 93 for bug 344878

Revision history for this message
Scott Emmons (lscotte) wrote :

For other people struggling with this issue specifically related to scala class filenames, there is an option to the scala compiler, -Xmax-classfile-name, which can be used to work around this issue. Any class names longer than the specified length will use a hash. Filenames are still prefixed with the Class name. As an example, filenames will look something like:

ThisIsTheNameOfMyClass$$anonfun$1$$$$451f27b826de0e7dafedb447696907b$$$$5$$anonfun$apply$mcV$sp$16$$anon$3.class

So they still have enough human grokable information in them.

And of course this doesn't help if you need to unjar/extract anything which was compiled with long filenames, but at least you can fix your own build systems with this option.

The limit that seems to work is 144: -Xmax-classfile-name 144