From 58d2edb9fc1bb68363e697b43be04c493ead81c5 Mon Sep 17 00:00:00 2001 From: Koushik Thirupattur Date: Tue, 3 Feb 2026 19:09:19 +0000 Subject: [PATCH 001/484] 8370688: java.util.jar.JarEntry.getCodeSigners() and getCertificates() should specify that they return a copy of the arrays Reviewed-by: jpai, mullan, liach --- .../share/classes/java/util/jar/JarEntry.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/java.base/share/classes/java/util/jar/JarEntry.java b/src/java.base/share/classes/java/util/jar/JarEntry.java index ff0750a3342..6037ee243e5 100644 --- a/src/java.base/share/classes/java/util/jar/JarEntry.java +++ b/src/java.base/share/classes/java/util/jar/JarEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, 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 @@ -114,8 +114,10 @@ public class JarEntry extends ZipEntry { * validate each signer's certificate chain, and determining whether * to trust the entry signed by the signers. * - * @return the {@code Certificate} objects for this entry, or - * {@code null} if none. + * @implSpec If non-null, this implementation returns a new array each time + * this method is invoked. + * + * @return the {@code Certificate} objects for this entry, or {@code null} if none. * */ public Certificate[] getCertificates() { @@ -139,8 +141,10 @@ public class JarEntry extends ZipEntry { * validate each signer's certificate chain, and determining whether * to trust the entry signed by the signers. * - * @return the {@code CodeSigner} objects for this entry, or - * {@code null} if none. + * @implSpec If non-null, this implementation returns a new array each time + * this method is invoked. + * + * @return the {@code CodeSigner} objects for this entry, or {@code null} if none. * * @since 1.5 */ From 5fea0741a6b7ff7e3a41844c86e422c0f0582333 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Tue, 3 Feb 2026 19:24:41 +0000 Subject: [PATCH 002/484] 8376297: ArrayIndexOutOfBoundsException Not Documented for SinglePixelPackedSampleModel.getSampleSize(int) Reviewed-by: aivanov, serb, azvegint, kizune --- .../java/awt/image/ComponentSampleModel.java | 8 +- .../image/MultiPixelPackedSampleModel.java | 8 +- .../image/SinglePixelPackedSampleModel.java | 9 +- .../jdk/java/awt/image/GetSampleSizeTest.java | 85 +++++++++++++++++++ 4 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 test/jdk/java/awt/image/GetSampleSizeTest.java diff --git a/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java b/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java index d15a8d214aa..4460b0fc101 100644 --- a/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java +++ b/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, 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 @@ -503,7 +503,11 @@ public class ComponentSampleModel extends SampleModel } /** Returns the number of bits per sample for the specified band. - * @param band the specified band + *

+ * Since all bands of a {@code ComponentSampleModel} are the same + * size, this method ignores the {@code band} parameter and returns + * the size of the first (0th) band. + * @param band the specified band (ignored) * @return the number of bits per sample for the specified band. */ public final int getSampleSize(int band) { diff --git a/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java b/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java index a79ddf52cd9..d8f97562c6c 100644 --- a/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java +++ b/src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, 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 @@ -235,7 +235,11 @@ public class MultiPixelPackedSampleModel extends SampleModel /** * Returns the number of bits per sample for the specified band. - * @param band the specified band + *

+ * Since {@code MultiPixelPackedSampleModel} has only one band, + * this method ignores the {@code band} parameter and returns + * the sample size of the single band. + * @param band the specified band (ignored) * @return the number of bits per sample for the specified band. */ public int getSampleSize(int band) { diff --git a/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java b/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java index d12c151a8fd..2ab226ea227 100644 --- a/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java +++ b/src/java.desktop/share/classes/java/awt/image/SinglePixelPackedSampleModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, 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 @@ -250,7 +250,12 @@ public class SinglePixelPackedSampleModel extends SampleModel return bitSizes.clone(); } - /** Returns the number of bits per sample for the specified band. */ + /** Returns the number of bits per sample for the specified band. + * @param band the specified band + * @return the size of the samples of the specified band. + * @throws ArrayIndexOutOfBoundsException if the {@code band} index + * is less than zero or greater than or equal to {@code getNumBands()} + */ public int getSampleSize(int band) { return bitSizes[band]; } diff --git a/test/jdk/java/awt/image/GetSampleSizeTest.java b/test/jdk/java/awt/image/GetSampleSizeTest.java new file mode 100644 index 00000000000..dcf6d1e6ed5 --- /dev/null +++ b/test/jdk/java/awt/image/GetSampleSizeTest.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2026, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.image.ComponentSampleModel; +import java.awt.image.DataBuffer; +import java.awt.image.MultiPixelPackedSampleModel; +import java.awt.image.SinglePixelPackedSampleModel; + +/* + * @test + * @bug 8376297 + * @summary Test SampleModel.getSampleSize(int) + */ + +public class GetSampleSizeTest { + + public static void main(String[] args) { + + final int width = 10; + final int height = 10; + int[] bandOffsets = {0, 0}; + int[] bitMask = {0x00ff0000, 0x0000ff00, 0xff, 0x0}; + + { + ComponentSampleModel csm = + new ComponentSampleModel(DataBuffer.TYPE_BYTE, + width, height, 1, width, bandOffsets); + int numBands = csm.getNumBands(); + System.out.println("CSM numBands = " + numBands); + if (numBands != 2) { + throw new RuntimeException("Unexpected numBands"); + } + System.out.println("CSM sample size = " + csm.getSampleSize(numBands)); + } + + { + MultiPixelPackedSampleModel mppsm = + new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE, width, height, 4); + int numBands = mppsm.getNumBands(); + System.out.println("MPPSM numBands = " + numBands); + if (numBands != 1) { + throw new RuntimeException("Unexpected numBands"); + } + System.out.println("MPPSM sample size = " + mppsm.getSampleSize(numBands)); + } + + { + SinglePixelPackedSampleModel sppsm = + new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE, width, height, bitMask); + int numBands = sppsm.getNumBands(); + System.out.println("SPPSM numBands = " + numBands); + if (numBands != 4) { + throw new RuntimeException("Unexpected numBands"); + } + try { + System.out.println("SPPSM sample size = " + sppsm.getSampleSize(numBands)); + throw new RuntimeException("No expected AIOBE"); + } catch (ArrayIndexOutOfBoundsException e) { + System.out.println("Got expected AIOBE for SPPSM"); + } + } + + } +} + From f3c8502e38de714caab8edd895113528f1ea4f5e Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Wed, 4 Feb 2026 00:51:29 +0000 Subject: [PATCH 003/484] 8227493: Return a more useful error message from lookupAllHostAddr if getaddrinfo results in EAI_SYSTEM error Reviewed-by: dfuchs, djelinski, michaelm --- .../unix/native/libnet/Inet4AddressImpl.c | 6 ++- .../unix/native/libnet/Inet6AddressImpl.c | 6 ++- .../unix/native/libnet/net_util_md.c | 37 ++++++++++++++++--- .../unix/native/libnet/net_util_md.h | 5 ++- 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/java.base/unix/native/libnet/Inet4AddressImpl.c b/src/java.base/unix/native/libnet/Inet4AddressImpl.c index 9bddbcaede7..e99dfd89411 100644 --- a/src/java.base/unix/native/libnet/Inet4AddressImpl.c +++ b/src/java.base/unix/native/libnet/Inet4AddressImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2026, 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 @@ -112,6 +112,8 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, error == EAI_SYSTEM && errno == EINTR); if (error) { + // capture the errno from getaddrinfo + const int sys_errno = errno; #if defined(MACOSX) // If getaddrinfo fails try getifaddrs, see bug 8170910. // java_net_spi_InetAddressResolver_LookupPolicy_IPV4_FIRST and no ordering is ok @@ -122,7 +124,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, } #endif // report error - NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error); + NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error, sys_errno); goto cleanupAndReturn; } else { int i = 0; diff --git a/src/java.base/unix/native/libnet/Inet6AddressImpl.c b/src/java.base/unix/native/libnet/Inet6AddressImpl.c index 8dce4f9cc6b..e0963c8dc3e 100644 --- a/src/java.base/unix/native/libnet/Inet6AddressImpl.c +++ b/src/java.base/unix/native/libnet/Inet6AddressImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2026, 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 @@ -231,6 +231,8 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, error == EAI_SYSTEM && errno == EINTR); if (error) { + // capture the errno from getaddrinfo + const int sys_errno = errno; #if defined(MACOSX) // if getaddrinfo fails try getifaddrs ret = lookupIfLocalhost(env, hostname, JNI_TRUE, characteristics); @@ -239,7 +241,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, } #endif // report error - NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error); + NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error, sys_errno); goto cleanupAndReturn; } else { int i = 0, inetCount = 0, inet6Count = 0, inetIndex = 0, diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c index 48cc1a7bb02..f7b690f1032 100644 --- a/src/java.base/unix/native/libnet/net_util_md.c +++ b/src/java.base/unix/native/libnet/net_util_md.c @@ -178,13 +178,21 @@ jint reuseport_supported(int ipv6_available) void NET_ThrowUnknownHostExceptionWithGaiError(JNIEnv *env, const char* hostname, - int gai_error) + int gai_error, + int sys_errno) { int size; char *buf; + const char *sys_errno_string = NULL; const char *error_string = gai_strerror(gai_error); - if (error_string == NULL) + if (error_string == NULL) { error_string = "unknown error"; + } + if (gai_error == EAI_SYSTEM) { + // EAI_SYSTEM implies that the actual error is stored in the system errno. + // Here we get the string representation of that errno. + sys_errno_string = strerror(sys_errno); + } int enhancedExceptions = getEnhancedExceptionsAllowed(env); if (enhancedExceptions == ENH_INIT_ERROR && (*env)->ExceptionCheck(env)) { return; @@ -195,16 +203,33 @@ void NET_ThrowUnknownHostExceptionWithGaiError(JNIEnv *env, } else { size = 0; } - size += strlen(error_string) + 3; - + if (sys_errno_string == NULL) { + // the 3 is for the additional 3 characters - colon, space and + // the NULL termination character, that we will include in the + // message of the Exception that we construct + size += strlen(error_string) + 3; + } else { + // the 5 is for the additional 5 characters - 2 colons, 2 spaces and + // the NULL termination character, that we will include in the + // message of the Exception that we construct + size += strlen(error_string) + strlen(sys_errno_string) + 5; + } buf = (char *) malloc(size); if (buf) { jstring s; int n; if (enhancedExceptions == ENH_ENABLED) { - n = snprintf(buf, size, "%s: %s", hostname, error_string); + if (sys_errno_string == NULL) { + n = snprintf(buf, size, "%s: %s", hostname, error_string); + } else { + n = snprintf(buf, size, "%s: %s: %s", hostname, error_string, sys_errno_string); + } } else { - n = snprintf(buf, size, " %s", error_string); + if (sys_errno_string == NULL) { + n = snprintf(buf, size, " %s", error_string); + } else { + n = snprintf(buf, size, " %s: %s", error_string, sys_errno_string); + } } if (n >= 0) { s = JNU_NewStringPlatform(env, buf); diff --git a/src/java.base/unix/native/libnet/net_util_md.h b/src/java.base/unix/native/libnet/net_util_md.h index dca6e97755a..639cf00515f 100644 --- a/src/java.base/unix/native/libnet/net_util_md.h +++ b/src/java.base/unix/native/libnet/net_util_md.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2026, 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 @@ -76,7 +76,8 @@ typedef union { */ void NET_ThrowUnknownHostExceptionWithGaiError(JNIEnv *env, const char* hostname, - int gai_error); + int gai_error, + int sys_errno); void NET_ThrowByNameWithLastError(JNIEnv *env, const char *name, const char *defaultDetail); From 14a6e928ce9a10f6d85fae8db4ce303da20bde85 Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Wed, 4 Feb 2026 02:04:04 +0000 Subject: [PATCH 004/484] 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out Reviewed-by: rriggs --- .../java/lang/ProcessBuilder/PipelineLeaksFD.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java b/test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java index 2b4cdfa9bdd..e7eaa57ec95 100644 --- a/test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java +++ b/test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java @@ -25,6 +25,7 @@ import org.junit.jupiter.api.condition.EnabledIf; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import static org.junit.jupiter.api.Assertions.*; +import jdk.test.lib.Utils; import java.io.BufferedReader; import java.io.IOException; @@ -32,6 +33,7 @@ import java.io.Writer; import java.lang.ProcessHandle; import java.nio.file.Files; import java.nio.file.Path; +import java.util.concurrent.TimeUnit; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; @@ -44,7 +46,8 @@ import java.util.stream.Collectors; * @bug 8289643 8291760 8291986 * @requires os.family == "mac" | (os.family == "linux" & !vm.musl) * @summary File descriptor leak detection with ProcessBuilder.startPipeline - * @run junit/othervm PipelineLeaksFD + * @library /test/lib + * @run junit/othervm/timeout=240 PipelineLeaksFD */ public class PipelineLeaksFD { @@ -236,8 +239,11 @@ public class PipelineLeaksFD { .redirectInput(lsofEmptyInput.toFile()) // empty input .redirectError(ProcessBuilder.Redirect.DISCARD) // ignored output .start()) { - int status = p.waitFor(); - assertEquals(0, status, "Process 'lsof' failed"); + boolean status = p.waitFor(Utils.adjustTimeout(120), TimeUnit.SECONDS); + if (!status) { + p.destroyForcibly(); + } + assertTrue(status, "Process 'lsof' failed"); return Files.readAllLines(lsofOutput); } catch (InterruptedException ie) { From 443cd77509bd4144ba7dfec26e3e7b2e62c799f9 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 4 Feb 2026 06:44:59 +0000 Subject: [PATCH 005/484] 8376758: Fix -Wzero-as-null-pointer-constant warnings in AIX code Reviewed-by: dholmes, jsjolen --- src/hotspot/os/aix/decoder_aix.hpp | 4 ++-- src/hotspot/os/aix/os_aix.cpp | 2 +- src/hotspot/os/aix/porting_aix.cpp | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/hotspot/os/aix/decoder_aix.hpp b/src/hotspot/os/aix/decoder_aix.hpp index 2ba3e1c5a3a..632355ccf4e 100644 --- a/src/hotspot/os/aix/decoder_aix.hpp +++ b/src/hotspot/os/aix/decoder_aix.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -38,7 +38,7 @@ class AIXDecoder: public AbstractDecoder { virtual bool demangle(const char* symbol, char* buf, int buflen) { return false; } // use AixSymbols::get_function_name to demangle virtual bool decode(address addr, char* buf, int buflen, int* offset, const char* modulepath, bool demangle) { - return AixSymbols::get_function_name(addr, buf, buflen, offset, 0, demangle); + return AixSymbols::get_function_name(addr, buf, buflen, offset, nullptr, demangle); } virtual bool decode(address addr, char *buf, int buflen, int* offset, const void *base) { ShouldNotReachHere(); diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index d7c1911a914..0a8efbece8d 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -703,7 +703,7 @@ static void *thread_native_entry(Thread *thread) { log_info(os, thread)("Thread finished (tid: %zu, kernel thread id: %zu).", os::current_thread_id(), (uintx) kernel_thread_id); - return 0; + return nullptr; } bool os::create_thread(Thread* thread, ThreadType thr_type, diff --git a/src/hotspot/os/aix/porting_aix.cpp b/src/hotspot/os/aix/porting_aix.cpp index 7311afc197b..b3f878fbfdd 100644 --- a/src/hotspot/os/aix/porting_aix.cpp +++ b/src/hotspot/os/aix/porting_aix.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2012, 2024 SAP SE. All rights reserved. - * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, 2026, 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 @@ -78,7 +78,7 @@ class fixed_strings { public: - fixed_strings() : first(0) {} + fixed_strings() : first(nullptr) {} ~fixed_strings() { node* n = first; while (n) { @@ -113,7 +113,7 @@ bool AixSymbols::get_function_name ( // information (null if not available) bool demangle // [in] whether to demangle the name ) { - struct tbtable* tb = 0; + struct tbtable* tb = nullptr; unsigned int searchcount = 0; // initialize output parameters @@ -653,10 +653,10 @@ void AixNativeCallstack::print_callstack_for_context(outputStream* st, const uco // To print the first frame, use the current value of iar: // current entry indicated by iar (the current pc) - codeptr_t cur_iar = 0; - stackptr_t cur_sp = 0; - codeptr_t cur_rtoc = 0; - codeptr_t cur_lr = 0; + codeptr_t cur_iar = nullptr; + stackptr_t cur_sp = nullptr; + codeptr_t cur_rtoc = nullptr; + codeptr_t cur_lr = nullptr; const ucontext_t* uc = (const ucontext_t*) context; @@ -926,7 +926,7 @@ static struct handletableentry* p_handletable = nullptr; static const char* rtv_linkedin_libpath() { constexpr int bufsize = 4096; static char buffer[bufsize]; - static const char* libpath = 0; + static const char* libpath = nullptr; // we only try to retrieve the libpath once. After that try we // let libpath point to buffer, which then contains a valid libpath From 1069ccebcc32e02055985e2babfa2986a2e295ca Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Wed, 4 Feb 2026 06:48:59 +0000 Subject: [PATCH 006/484] 8376684: Compile OpenJDK in headless mode without required X11 libraries Reviewed-by: erikj, aivanov --- doc/building.html | 7 +++---- doc/building.md | 6 ++---- make/autoconf/libraries.m4 | 8 ++++---- make/modules/java.desktop/lib/AwtLibraries.gmk | 16 ++++++++++++++-- .../unix/native/common/awt/utility/rect.h | 4 ++-- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/doc/building.html b/doc/building.html index 8e5a7625371..534888ef667 100644 --- a/doc/building.html +++ b/doc/building.html @@ -1385,10 +1385,9 @@ dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb . can specify it by --with-alsa.

X11

-

You will need X11 libraries suitable for your target system. -In most cases, using Debian's pre-built libraries work fine.

-

Note that X11 is needed even if you only want to build a headless -JDK.

+

When not building a headless JDK, you will need X11 libraries +suitable for your target system. In most cases, using Debian's +pre-built libraries work fine.