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

-profile <compact> does not work when -bootclasspath specified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • tools
    • None
    • b105
    • Verified

    Description

      Consider test file like this:
      -------
      public class Test {
           javax.swing.JButton b;
      }
      ------

      This correctly fails to compile with -profile compact1:
      $ javac -profile compact1 Test.java
      Test.java:2: error: JButton is not available in profile 'compact1'
           javax.swing.JButton b;
                      ^
      1 error

      But the compilation is successful if -bootclasspath is specified (to the rt.jar from the compiler's JDK):
      $ javac -profile compact1 -bootclasspath <path-to-jdk>/jre/lib/rt.jar Test.java
      resulting in a classfile that won't be able to run in the compact1 profile.

      Specifying -bootclasspath may be necessary e.g. when -source is used.

      Version:
      $ javac -fullversion
      javac full version "1.8.0-ea-b79"

      Attachments

        Activity

          People

            vromero Vicente Arturo Romero Zaldivar
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: