[GitHub] [ant] slobokot opened a new pull request #98: Use commandline argument file for all options, but -J, for case javac…

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [ant] slobokot opened a new pull request #98: Use commandline argument file for all options, but -J, for case javac…

GitBox
slobokot opened a new pull request #98: Use commandline argument file for all options, but -J, for case javac…
URL: https://github.com/apache/ant/pull/98
 
 
   Currently only java files are passed using commandline argument file for javac.
   There are times when classpath is longer than 8000 characters. on unix that works, but on windows it doesn't, see https://support.microsoft.com/en-us/help/830473/command-prompt-cmd-exe-command-line-string-limitation. That leads to exception like
   ```
   at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:601)
           at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:62)
           at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1395)
           at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1121)
           ...
   Caused by: java.io.IOException: Cannot run program "c:\...\javac.exe" (in directory "..."): CreateProcess error=206, The filename or extension is too long
           at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
           at java.lang.Runtime.exec(Runtime.java:620)
           at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
           at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:426)
           at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:440)
           at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:598)
           ... 33 more
   Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
           at java.lang.ProcessImpl.create(Native Method)
           at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
           at java.lang.ProcessImpl.start(ProcessImpl.java:137)
           at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
           ... 38 more
   ```
   
   This pull requests puts all but -J options into commandline argument file. -J options can't be specified in commandline argument file as per documentation: https://docs.oracle.com/en/java/javase/11/tools/javac.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]