Skip to content

Conversation

MrPottery
Copy link

This branch was created to address the problem of getting 'Command too long' errors from javac becase the classpath is too long.
The change instead writes the javac options to a file in the temporary directory that ALE creates and builds the javac command to use the @<options_file> method of specifying the options.

These changes allowed me to use ALE with my Java projects where previously it failed due to the javac command line being longer than the ~8K allowed by Windows.

…d line to prevent 'Command too long' errors when classpath is too long
@w0rp
Copy link
Member

w0rp commented Jun 13, 2025

If this is a way forward, and I'll need to think about this idea, we should use the functions in ALE for managing temporary files. Have a look at the documentation for them. I'd link to them, but I'm currently on a train. 😃

@w0rp w0rp requested a review from Copilot June 13, 2025 18:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the way javac options are passed to avoid "Command too long" errors by writing options to a temporary file and referencing it via the @file syntax.

  • The temporary file now contains the necessary javac options.
  • Adjusted path strings for Windows compatibility are applied to classpath and source path options.

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

Successfully merging this pull request may close these issues.

2 participants