3

I get this error when I try to compile a program with very long classpath in Eclipse with GWT compiler.

Cannot run program "...java" ... java.io.IOException: error=7, Argument list too long

Could only find one reference on web.

lakshman
  • 2,641
  • 6
  • 37
  • 63
Parth
  • 523
  • 1
  • 7
  • 21
  • 2
    Note: This is probably not related to gwt. It just happens, that the gwt compiler is a Java application, and sometimes requires a long argument list, because it's a compiler. Please post your java call (are you using ant?), and double-check, if you really need all the libraries you're including in your classpath. – Chris Lercher Jul 10 '11 at 12:12
  • @Chris is right, this is not a GWT problem. This is a problem with your build tool, supplying too many command-line arguments to the GWT compiler. – skaffman Jul 10 '11 at 12:23
  • This is on Redhat Linux, Eclipse. I am using the Google plugin for eclipse to compile the project. I can not get rid of any of the dependencies, all of them are required. I am going to try compiling it using ant target and see what happens. However, Eclipse's GWT compile is convenient. It would be good if I can get that working. – Parth Jul 13 '11 at 00:27
  • A not recommended way to solve that is to package all (or most of) your dependencies in a single jar file to shrink the number of files in the classpath, and thus reducing the arguments to the compiler. – Gilberto Torrezan Jan 30 '14 at 19:05

0 Answers0