Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5339

Let's NetBeans Java Support work with --release X flag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 12.0
    • None
    • java - Source
    • None

    Description

      Since JDK9 there is -release flag which can specify which JDK API one wishes to compile against. Time to use it in NetBeans!

      Historically NetBeans Java support tries to detect a JDK one is running on and decrease the requested -source level to the supported JDK. This is very annoying and in the context of -release flag, unnecessary.

      Modern javac compiler have snapshot JDK API for each version since JDK7 to the latest JDK. Regardless on which version the NetBeans IDE is running, people should be able to select the right release/target JDK and get errors according to its API.

      By default a specified -source (by a SourceVersionQuery) should also imply appropriate -release. There might be other means how to control both source as well as release.

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            jtulach Jaroslav Tulach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: