Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile with a long classpath on Windows #70

Closed
mkadan opened this issue Oct 5, 2015 · 7 comments
Closed

Fails to compile with a long classpath on Windows #70

mkadan opened this issue Oct 5, 2015 · 7 comments

Comments

@mkadan
Copy link

mkadan commented Oct 5, 2015

When retrobmda required a long classpath to compile (in my case it's an Android project with AndroidAnnotations and lot's of dependencies), it generates too long command line to be acceptable for Windows (see http://pastebin.com/vzwP1bdX) and fails to launch java process ("CreateProcess error=206, The filename or extension is too long", see http://pastebin.com/6PpR0npu)

@luontola
Copy link
Owner

luontola commented Oct 7, 2015

Yes, long classpaths have problems with the command line limit. Maybe an environment variable could be used instead, though that also has a lenght limit. Another option would be to write the classpath in a file.

@dynastyX
Copy link

@orfjackal I've encountered with this problem too. cound you please tell me how to fix it?

@atexit
Copy link

atexit commented Oct 30, 2015

I guess that a manifest-only jar would cover the write classpath in a file solution?

@luontola
Copy link
Owner

luontola commented Nov 1, 2015

A manifest-only jar would not work for Retrolambda, because Retrolambda needs to use a custom class loader for #29. (A manifest-only jar is a useful trick for test runners to set the system classpath.) I'll implement a command line parameter which reads the classpath from a text file (one entry per line). It's also much simpler than using a manifest-only jar.

@atexit
Copy link

atexit commented Nov 2, 2015

Thank you for taking the time to explain, @orfjackal !

@fschoellhammer
Copy link

I am experiencing the same issue. I noticed that once I encounter this problem, I need to clean the project, then it works again (until the issue occurs again some time later). Also, what I saw that the 'long command that fails' lists every class of my project separately. Wouldn't it be possible to just jar the sources before and feed them in as a file instead of separate class files?

@luontola
Copy link
Owner

This is included in Retrolambda 2.1.0. The gradle plugin will still need to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants