Skip to content

Better handling of javac options when invoking directly #1968

@jroper

Description

@jroper

On upgrading to sbt 0.13.8:

[debug] Attempting to call com.sun.tools.javac.api.JavacTool@572e024c directly...
java.lang.IllegalArgumentException: invalid flag: -J-Xmx512m
    at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:206)

We need to increase the memory for javac, so if it does fork, we need it to use that setting, but if it doesn't fork, then it fails. Some possibilities:

  • Automatically exclude -J options, possibly warning if present
  • Make it possible to check whether javac will be forked or not
  • Provide a separate set of options that only get used when javac is forked

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions