Argument file generator.
To shorten or simplify the javac command, you can specify one or more files that contain arguments to the javac command (except -J options). This enables you to create javac commands of any length on any operating system. An argument file can include javac options and source file names in any combination.
- Add one of the options below to the pom.xml file:
<dependency>
<groupId>io.github.wniemiec-io-java</groupId>
<artifactId>argument-file</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>wniemiec.io.java</groupId>
<artifactId>argument-file</artifactId>
<version>LATEST</version>
</dependency>
- Run
$ mvn install
- Use it
[...]
import wniemiec.io.java.ArgumentFile;
[...]
Path workingDirectory = Path.of(System.getProperty("java.io.tmpdir"));
String filename = "argfile";
argumentFile = new ArgumentFile(workingDirectory, filename);
argumentFile.create(List.of(
Path.of("C:", "Foo", "Bar", "file1.jar"),
Path.of("C:", "Foo", "Bar", "file2.jar"),
Path.of("C:", "Foo")
);
[...]
javac @argfile.txt
Property | Parameter type | Return type | Description | Default parameter value |
---|---|---|---|---|
create | paths: List<Paths> |
Path |
Generates argument file from a list of paths. | - |
delete | void |
void |
Removes argument-file | - |
exists | void |
boolean |
Checks if the argument-file has created. | - |
Details about each version are documented in the releases section.
See the documentation on how you can contribute to the project here.
Name | Type | Description |
---|---|---|
dist | Directory |
Released versions |
docs | Directory |
Documentation files |
src | Directory |
Source files |