Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

classlist different from OpenJDK built by Oracle #645

Open
marschall opened this issue Oct 15, 2018 · 7 comments
Open

classlist different from OpenJDK built by Oracle #645

marschall opened this issue Oct 15, 2018 · 7 comments
Labels
bug Issues that are problems in the code as reported by the community

Comments

@marschall
Copy link

When I compare the lib/classlist files of OpenJDK 11 built by Oracle and AdoptOpenJDK 11 the contents are different (the contents seem to be unsorted first, so I had to pipe the through sort first)

The following is the output of diff

< java/time/DayOfWeek
< java/time/Month
< java/time/temporal/TemporalAdjusters
< java/time/zone/ZoneOffsetTransition
< java/time/zone/ZoneOffsetTransitionRule$1
< java/time/zone/ZoneOffsetTransitionRule$TimeDefinition
< java/util/zip/CRC32
< java/util/zip/Checksum
< java/util/zip/Checksum$1
< sun/nio/cs/Surrogate
< sun/nio/cs/Surrogate$Parser
< sun/nio/cs/US_ASCII$Encoder
> sun/nio/cs/UTF_8$Encoder
< sun/util/calendar/ZoneInfoFile$Checksum
  • < means present in OpenJDK 11 built by Oracle but missing in AdoptOpenJDK 11
  • > means missing in OpenJDK 11 built by Oracle but present in AdoptOpenJDK 11, only sun/nio/cs/UTF_8$Encoder
@johnoliver
Copy link
Contributor

well even if it is not listed in lib/classlist. At least for DayOfWeek, it is present in src.zip.
The class is present when you run jmod list jmods/java.base.jmod

And the following program successfully compiles and runs

import java.time.DayOfWeek;
public class TestDayOfWeek {
    public static void main(String[] args) {
        DayOfWeek day = DayOfWeek.of(1);
        System.out.println(day.toString());
    }
}

So why it is not in lib/classlist I dont know, but that class is present

@karianna karianna added the bug Issues that are problems in the code as reported by the community label Oct 16, 2018
@apjanke
Copy link

apjanke commented Oct 30, 2018

I am seeing similar, but apparently backward results. Many of these classes are present in the lib/classlist for an AdoptOpenJDK build I did from source, but are absent from the Oracle JDK 11.0.1 that I downloaded from oracle.com.

This is on macOS 10.13.6.

$ cd tmp
[~/tmp]
$ sort ~/local/repos/openjdk-build/workspace/build/src/build/macosx-x86_64-normal-server-release/images/jdk/lib/classlist > classlist-adoptopenjdk
[~/tmp]
$ sort /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/classlist > classlist-oracle
[~/tmp]
$ diff classlist-adoptopenjdk classlist-oracle
5d4
< java/io/ByteArrayOutputStream
14d12
< java/io/Externalizable
375d372
< java/security/CodeSigner
419d415
< java/time/DayOfWeek
427d422
< java/time/Month
479d473
< java/time/temporal/TemporalAdjusters
493,495d486
< java/time/zone/Ser
< java/time/zone/TzdbZoneRulesProvider
< java/time/zone/ZoneOffsetTransition
497,498d487
< java/time/zone/ZoneOffsetTransitionRule$1
< java/time/zone/ZoneOffsetTransitionRule$TimeDefinition
500,501d488
< java/time/zone/ZoneRulesProvider
< java/time/zone/ZoneRulesProvider$1
736d722
< java/util/jar/JarVerifier
848,850d833
< java/util/zip/CRC32
< java/util/zip/Checksum
< java/util/zip/Checksum$1
1025a1009,1010
> jdk/internal/vm/PostVMInitHook
> jdk/internal/vm/PostVMInitHook$1
1089d1073
< sun/security/util/ManifestEntryVerifier
1105d1088
< sun/util/calendar/ZoneInfoFile$Checksum

Does anyone know where the code that generates lib/classlist lives?

@karianna
Copy link
Contributor

Adopt hasn't released an 11.0.1 yet....

@gdams
Copy link
Member

gdams commented Mar 20, 2019

@marschall can this be closed?

@karianna
Copy link
Contributor

I think this warrants further investigation.

@marschall
Copy link
Author

I checked with 11.0.2 and the following classes are sill missing from classlist compared to the builds by Oracle

< java/time/DayOfWeek
< java/time/Month
< java/time/temporal/TemporalAdjusters
< java/time/zone/ZoneOffsetTransition
< java/time/zone/ZoneOffsetTransitionRule$1
< java/time/zone/ZoneOffsetTransitionRule$TimeDefinition
< java/util/zip/Checksum
< java/util/zip/Checksum$1
< java/util/zip/CRC32
< sun/nio/cs/Surrogate
< sun/nio/cs/Surrogate$Parser
< sun/nio/cs/US_ASCII$Encoder
> sun/nio/cs/UTF_8$Encoder
< sun/util/calendar/ZoneInfoFile$Checksum

So the situation remains unchanged.

@karianna karianna added this to the March 2019 milestone Mar 21, 2019
@karianna karianna modified the milestones: March 2019, April 2019 Apr 1, 2019
@marschall
Copy link
Author

I am not sure but I believe this file is used for the default CDS archive:
https://archive.fosdem.org/2018/schedule/event/class_data_sharing/

@karianna karianna modified the milestones: April 2019, May 2019 May 1, 2019
@karianna karianna modified the milestones: May 2019, June 2019 Jun 3, 2019
@karianna karianna modified the milestones: June 2019, July 2019 Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are problems in the code as reported by the community
Projects
Status: Todo
Development

No branches or pull requests

5 participants