Use @argument files in the Java binary wrapper script

Open
#331 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Locate the Java binary wrapper script and read the existing manifest-jar workaround for long classpaths. Compare it with JDK 9 argument-file support and determine the compatibility approach for older --javabase versions; done means the wrapper uses argument files when targeting JDK 9 and addresses the stated older-version case.

Written by the indexing model from the issue text.

Description

P3

The Java binary wrapper script works around command line length limits by creating a jar file with a Class-Path manifest entry containing the long classpath (related: bazelbuild/bazel#6289).

JDK 9 adds support for flag files using the @argument-file syntax, see "java Command-Line Argument Files" in https://docs.oracle.com/javase/9/tools/java.htm.

We should use that instead of the manifest jar hack when targeting JDK 9.

We could back-fill support for that syntax for older --javabase versions by adding logic to the wrapper script.

Dominant language
Starlark
Stars
103
Forks
102
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_java

All issues in bazelbuild/rules_java

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.