Skip to content

Passing arguments to the Java compiler. #2269

Closed

Description

@4g3nt47

Is it not possible to pass arguments to the Java compiler on a project with no build tools? I just want to pass -release 9 to java compiler to support older JVMs. I can't find anything in settings.

  • Platform: Debian 10 Linux
  • VScode: version 1.63.2

Activity

  1. rgrunber commented on Feb 8, 2022

    @rgrunber
    Member

    For the -release option, you should be able to use org.eclipse.jdt.core.compiler.compliance=9 in a settings file. See https://github.com/redhat-developer/vscode-java/wiki/Settings-Global-Preferences for more details. I'm not sure if there's a setting that allows one to pass arbitrary compiler options. CC'ing @snjeza in case there is a way.

  2. rgrunber commented on Feb 8, 2022

    @rgrunber
    Member

    See #2304 (comment) for the more general way to do this. You'd need to install vscode-java-debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions