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

Better handling of classpath jar files in javac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 19
    • tools

      Currently in javac while reading manifest files and when creating an archive container we open the same jar file twice once in FSInfo class to read manifest attributes and again in JavacFileManager class which reduces the performance of javac. To resolve this we should be creating a cache of file systems after reading a jar file either in FSInfo or JavacFileManager classes.
      I'm attaching a test case where the opening of a single jar file multiple times can be observed. I have given rt.jar file as the classpath to test this use case.

        1. CompileTest.java
          1 kB
          Ravi Reddy
        2. HelloWorld.java
          0.1 kB
          Ravi Reddy

            rreddy Ravi Reddy
            rreddy Ravi Reddy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: