Class Argfile

java.lang.Object
com.qulice.errorprone.Argfile

public final class Argfile extends Object
A javac argfile materialised on disk.

Wraps a list of command-line tokens and writes them to a single file in javac's argfile format — one double-quoted token per line with backslashes and double quotes escaped — so even very long classpaths and source lists stay below the Windows CreateProcess command-line limit when passed to javac as @path. The -J launcher flags must NOT be included here; javac forbids them inside argfiles.

Since:
1.0
  • Constructor Details

    • Argfile

      public Argfile(File place, List<String> args)
      Constructor.
      Parameters:
      place - Target file path
      args - Tokens to write
  • Method Details

    • save

      public File save()
      Write the argfile and return its path.
      Returns:
      The path of the just-written argfile