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

Smartjavac needs more flexibility with linking to sources

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b105

      Description

      While trying to solve JDK-8009280, I've stumbled on a limitation in sjavac. I want to compile all java classes except the security classes first to jdk/classes, and then as a separate step, compile the security classes into a different directory. Using normal javac this works as it will pick up the sources for the security classes to link to them while compiling the rest. When using sjavac, since the security classes are filtered out, it will not find them for linking either.

      A possible workaround would be to copy the security classes to a different directory and add that directory with -sourcepath, and I think they would be available since the -sourcepath parameter would have a different set of filter rules defined. This feels akward though.

      What I would like is a switch to sjavac that disabled the strict filtering of sources to link to. I simulated this behavior by commenting out the filtering in SmartFileManager.java and got successful builds with the expected results. I can probably figure out how to add a parameter to control this behavior too, but would appreciate some help from the langtools team.

      Fixing this is important since JDK-8009280 needs to be fixed for the JCE team to start using the new build and we very much want to get sjavac enabled by default.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              erikj Erik Joelsson
              Reporter:
              erikj Erik Joelsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: