Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8188823

javac --release N does not work for JavaFX modules linked in JDK N+1 runtime

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b36

      Description

      import javafx.application.Application;
      public class Testing { public static void main(String... args) {} }

      $ javac Testing.java // compile successfully

      $ javac --release 8 Testing.java
      it results in an error
              Testing.java:1:error: package javafx.application does not exist

      It might be reasonable for javac --release 8 to require putting jfxrt.jar from JDK 8 on the classpath since it's target for an older runtime.

      I think jdk10/bin/javac --release 9 should support compiling Testing.java.

      [1] See http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-October/005993.html

        Attachments

          Activity

            People

            • Assignee:
              jlahoda Jan Lahoda
              Reporter:
              mchung Mandy Chung
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: