< prev index next >

src/java.base/share/classes/jdk/internal/jimage/ImageHeader.java

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this

@@ -28,20 +28,37 @@
  import java.nio.ByteBuffer;
  import java.nio.IntBuffer;
  import java.util.Objects;
  
  /**
+  * Defines the header and version information for jimage files.
+  *
+  * <p>Version number changes must be synced in a single change across all code
+  * which reads/writes jimage files, and code which tries to open a jimage file
+  * with an unexpected version should fail.
+  *
+  * <p>Known jimage file code which needs updating on version change:
+  * <ul>
+  *     <li>src/java.base/share/native/libjimage/imageFile.hpp
+  * </ul>
+  *
+  * <p>Version history:
+  * <ul>
+  *     <li>{@code 1.0}: Original version.
+  *     <li>{@code 1.1}: Support preview mode with new flags.
+  * </ul>
+  *
   * @implNote This class needs to maintain JDK 8 source compatibility.
   *
   * It is used internally in the JDK to implement jimage/jrtfs access,
   * but also compiled and delivered as part of the jrtfs.jar to support access
   * to the jimage file provided by the shipped JDK by tools running on JDK 8.
   */
  public final class ImageHeader {
      public static final int MAGIC = 0xCAFEDADA;
      public static final int MAJOR_VERSION = 1;
-     public static final int MINOR_VERSION = 0;
+     public static final int MINOR_VERSION = 1;
      private static final int HEADER_SLOTS = 7;
  
      private final int magic;
      private final int majorVersion;
      private final int minorVersion;
< prev index next >