### Install Autoconf on Windows via Cygwin Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs Autoconf on Windows using the Cygwin setup utility. This is necessary for building the JDK in a Cygwin environment. ```bash /setup-x86_64 -q -P autoconf ``` -------------------------------- ### Install Cygwin Packages Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs required packages for building the JDK on Cygwin. Ensure you have the correct path to the Cygwin setup executable. ```bash /setup-x86_64 -q -P autoconf -P make -P unzip -P zip ``` -------------------------------- ### Basic JTreg Test Setup with IR Framework Source: https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/ir_framework/README.md Demonstrates the basic structure of a JTreg test using the IR framework. It includes the necessary JTreg header annotations, imports, and the main method to run the framework. The example also shows how to annotate a test method with `@Test` and `@IR` for specific IR checks. ```Java /* * @test * @summary A simple test using the test framework. * @library /test/lib / * @run driver my.package.MySimpleTest */ package my.package; import compiler.lib.ir_framework.*; public class MySimpleTest { public static void main(String[] args) { TestFramework.run(); // The framework runs all tests of this class. } @Test @IR(failOn = IRNode.STORE) // Fail if the IR of myTest() contains any stores. public void myTest() { /* ... */ } } ``` -------------------------------- ### Install SLEEF Source: https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/unix/native/libsleef/upstream/README.adoc Install the SLEEF library and headers to a specified directory using CMake's install command. ```bash cmake --install build --prefix= ``` -------------------------------- ### Platform Documentation Link Example Source: https://github.com/openjdk/jdk/blob/master/src/jdk.javadoc/share/man/javadoc.md Example properties file content for configuring links to platform documentation for specific versions. ```properties doclet.platform.docs.15=https://example.com/api/15/ doclet.platform.docs.16=https://example.com/api/16/ doclet.platform.docs.17=https://example.com/api/17/ ``` -------------------------------- ### Install SLEEF Library and Headers Source: https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/unix/native/libsleef/upstream/src/libm/CMakeLists.txt Installs the main SLEEF library, its header files, and pkgconfig file. This ensures the library is available for runtime and development. ```cmake # Install libsleef and sleef.h install( TARGETS ${TARGET_LIBSLEEF} EXPORT sleefTargets PUBLIC_HEADER # DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT sleef_Development LIBRARY # DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT sleef_Runtime NAMELINK_COMPONENT sleef_Development ARCHIVE # DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT sleef_Development RUNTIME # DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT sleef_Runtime INCLUDES # DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) configure_file("sleef.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/sleef.pc" @ONLY) install( FILES "${CMAKE_CURRENT_BINARY_DIR}/sleef.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" COMPONENT sleef_Development ) ``` -------------------------------- ### jlink Options File Example Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jlink/share/man/jlink.md This example shows how to save jlink options in a text file for later use. Options can be placed on multiple lines, and lines starting with '#' are treated as comments. Environment variables cannot be used for path names. ```shell #Wed Dec 07 00:40:19 EST 2016 --module-path mlib --add-modules com.greetings --output greetingsapp ``` -------------------------------- ### Example Command in Compiler File Source: https://github.com/openjdk/jdk/blob/master/src/java.base/share/man/java.md This example shows a line in a JIT compiler command file that prints assembly code for a specific method. ```bash print java/lang/String toString ``` -------------------------------- ### Install Inline Header Files Source: https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/unix/native/libsleef/upstream/src/libm/CMakeLists.txt Installs the generated inline header files to the system's include directory, componentized for sleef development. ```cmake install( FILES ${INLINE_HEADER_FILES_GENERATED} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT sleef_Development ) ``` -------------------------------- ### Install SCTP Runtime Library (Fedora/Red Hat) Source: https://github.com/openjdk/jdk/blob/master/doc/testing.html Installs the SCTP runtime library and loads the sctp module on RPM-based systems. Required for SCTP tests. ```bash sudo dnf install -y lksctp-tools sudo modprobe sctp lsmod | grep sctp ``` -------------------------------- ### Install libdft Library Components Source: https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/unix/native/libsleef/upstream/src/dft/CMakeLists.txt Specifies installation rules for the libdft library, including headers, runtime libraries, development files, and executables. ```cmake install( TARGETS ${TARGET_LIBDFT} EXPORT sleefTargets PUBLIC_HEADER # DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT sleef_Development LIBRARY # DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT sleef_Runtime NAMELINK_COMPONENT sleef_Development ARCHIVE # DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT sleef_Development RUNTIME # DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT sleef_Runtime INCLUDES # DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) ``` -------------------------------- ### Install SCTP Runtime Library (Debian/Ubuntu) Source: https://github.com/openjdk/jdk/blob/master/doc/testing.html Installs the SCTP runtime library and loads the sctp module on Debian-based systems. Required for SCTP tests. ```bash sudo apt install libsctp1 sudo modprobe sctp lsmod | grep sctp ``` -------------------------------- ### Make Configuration Selector Examples Source: https://github.com/openjdk/jdk/blob/master/doc/building.md Demonstrates how to use the CONF and CONF_NAME make variables to select specific build configurations. CONF allows substring matching and negation, while CONF_NAME requires an exact match. ```bash make CONF= ``` ```bash make CONF_NAME= ``` -------------------------------- ### VM.command_line Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jcmd/share/man/jcmd.md Print the command line used to start this VM instance. ```APIDOC ## VM.command_line ### Description Print the command line used to start this VM instance. ### Impact Low ``` -------------------------------- ### Example of a Blocking Non-Daemon Thread Source: https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/doc-files/AWTThreadIssues.html Provides a Java code example demonstrating how to create and start a non-daemon thread that blocks indefinitely, preventing the JVM from exiting. ```APIDOC ## Example: Blocking Non-Daemon Thread ### Description This code snippet illustrates how to create a non-daemon thread that will block indefinitely, ensuring the Java Virtual Machine (JVM) does not exit until this thread terminates. ### Code Example ```java Runnable r = new Runnable() { public void run() { Object o = new Object(); try { synchronized (o) { o.wait(); } } catch (InterruptedException ie) { // Handle interruption if necessary } } }; Thread t = new Thread(r); t.setDaemon(false); // Crucial: Set as non-daemon t.start(); ``` ### Explanation * A `Runnable` task is defined that waits on an `Object` monitor. * A new `Thread` is created with this `Runnable`. * `t.setDaemon(false)` explicitly marks the thread as non-daemon. Non-daemon threads prevent the JVM from exiting as long as they are running. * `t.start()` begins the execution of the thread. ### JVM Guarantee The Java Virtual Machine Specification guarantees that the JVM will not exit as long as this non-daemon thread is active. ``` -------------------------------- ### Run pcscd Daemon Source: https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/smartcardio/README.txt Start the pcscd daemon in the foreground after installation. This command should be run as root. ```bash cd /usr/local/sbin ./pcscd --foreground ``` -------------------------------- ### Create Certificate Chain with keytool Source: https://github.com/openjdk/jdk/blob/master/src/java.base/share/man/keytool.md This example demonstrates creating a certificate chain by signing certificates sequentially. It involves generating key pairs, creating certificate requests, signing them with a CA's private key, and importing the signed certificates. ```bash keytool -alias ca1 -certreq | \ keytool -alias ca -gencert -ext san=dns:ca1 | \ keytool -alias ca1 -importcert ``` ```bash keytool -alias ca2 -certreq | \ keytool -alias ca1 -gencert -ext san=dns:ca2 | \ keytool -alias ca2 -importcert ``` -------------------------------- ### Download Metal Toolchain on macOS Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs the Metal toolchain separately on macOS, which is required starting with Xcode 26. ```bash xcodebuild -downloadComponent MetalToolchain ``` -------------------------------- ### GET /javax/sound/sampled/AudioSystem Source: https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt The entry point to the Java Sound System, providing access to installed mixers and line information. ```APIDOC ## GET /javax/sound/sampled/AudioSystem ### Description Acts as the central registry for audio resources. Use this to query available mixers and lines. ### Method GET ### Endpoint javax/sound/sampled/AudioSystem ### Response #### Success Response (200) - **mixerInfo** (Array) - List of available audio mixers. #### Response Example { "mixerInfo": [ { "name": "Primary Sound Driver" } ] } ``` -------------------------------- ### Initialize and Use Compile Framework Source: https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/compile_framework/README.md Demonstrates the basic usage of the Compile Framework: creating an instance, adding Java source code, compiling it, and invoking a method on the compiled class. This is the fundamental workflow for utilizing the framework. ```Java CompileFramework compileFramework = new CompileFramework(); compileFramework.addJavaSourceCode("XYZ", ""); compileFramework.compile(); Object returnValue = compileFramework.invoke("XYZ", "test", new Object[] {5}); ``` -------------------------------- ### GET /java/text/AttributedCharacterIterator Source: https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/share/data/symbols/java.base-8.sym.txt Retrieves information about an attributed character iterator, including run starts, limits, and attribute maps. ```APIDOC ## GET /java/text/AttributedCharacterIterator ### Description Provides methods to access text content along with associated attributes, useful for styled text processing. ### Method GET ### Endpoint /java/text/AttributedCharacterIterator ### Parameters #### Query Parameters - **attribute** (Attribute) - Optional - The specific attribute key to filter runs. ### Response #### Success Response (200) - **runStart** (int) - The start index of the current run. - **runLimit** (int) - The limit index of the current run. - **attributes** (Map) - A map of all attributes at the current position. #### Response Example { "runStart": 0, "runLimit": 10, "attributes": { "FONT": "Arial" } } ``` -------------------------------- ### Configure for 32-bit Windows Build with FreeType2 Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Example of creating a 32-bit build for Windows, specifying the FreeType2 path and target bits. ```bash bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32 ``` -------------------------------- ### Create Configuration in Build Directory Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Alternative method to create a new configuration by creating a directory under 'build' and running configure from there. ```bash mkdir build/ && cd build/ && bash ../../configure ``` -------------------------------- ### Get OpenJDK Source Code Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Clone the main-line OpenJDK repository using Git. Ensure you have Git installed and configured. ```bash git clone https://git.openjdk.org/jdk ``` -------------------------------- ### Starting a JShell Session Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jshell/share/man/jshell.md Demonstrates how to initiate a JShell session from the command line and the initial welcome message displayed. This is the entry point for interacting with JShell. ```bash % jshell | Welcome to JShell -- Version 9 | For an introduction type: /help intro jshell> ``` -------------------------------- ### GET /javax/xml/stream/events/StartElement Source: https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/share/data/symbols/java.xml-8.sym.txt Retrieves information about a start element event in an XML stream, including its name, attributes, and namespace context. ```APIDOC ## GET /javax/xml/stream/events/StartElement ### Description Provides access to the details of a start element event, such as the element name, attributes, and namespace declarations. ### Method GET ### Endpoint javax.xml.stream.events.StartElement ### Parameters #### Path Parameters - **name** (QName) - Required - The qualified name of the element. ### Response #### Success Response (200) - **name** (QName) - Returns the QName of the element. - **attributes** (Iterator) - Returns an iterator of attributes. - **namespaces** (Iterator) - Returns an iterator of namespaces. #### Response Example { "name": "{http://example.com}root", "attributes": [], "namespaces": [] } ``` -------------------------------- ### MSCAPI Keystore Tests on Windows Source: https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/tools/keytool/i18n.html Provides examples for testing the Windows-MY keystore type using keytool. It covers listing entries, handling the 'NONE' keystore, and verifying restrictions on store type and password arguments. ```bash keytool -storetype Windows-MY -list keytool -storetype Windows-MY -list -keystore NONE keytool -storetype Windows-MY -list -keystore other keytool -storetype Windows-MY -list -storepass changeit ``` -------------------------------- ### Override Native Compiler for Configure Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Example of overriding the default C or C++ compiler when running the './configure' script, useful for cross-compilation setups. ```bash # Native compilers: override CC or CXX for ./configure ``` -------------------------------- ### Install X11 Development Libraries on Debian/Ubuntu Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs necessary X11 development libraries on apt-based Linux systems. Ensure these are installed before configuring the build. ```bash sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev ``` -------------------------------- ### Build Output Structure Example Source: https://github.com/openjdk/jdk/blob/master/doc/building.md The build output for a configuration is located in `$BUILD/`. This directory contains several important subdirectories for build artifacts and tools. ```text buildtools/ configure-support/ hotspot/ images/ jdk/ make-support/ support/ test-results/ test-support/ ``` -------------------------------- ### Start jstatd with External RMI Registry Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jstatd/share/man/jstatd.md Starts the jstatd server utilizing an external RMI registry. This requires the RMI registry to be started separately. ```shell rmiregistry & jstatd ``` -------------------------------- ### Create Build Directory Source: https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/unix/native/libsleef/upstream/README.adoc Navigate into the SLEEF directory and create a separate directory for an out-of-source build. ```bash cd sleef && mkdir build ``` -------------------------------- ### Start jstatd with External RMI Registry on Custom Port Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jstatd/share/man/jstatd.md Starts the jstatd server with an external RMI registry on a specified port (e.g., 2020). The RMI registry must be started on the same port. ```shell jrmiregistry 2020 & jstatd -p 2020 ``` -------------------------------- ### Access Help Documentation Source: https://github.com/openjdk/jdk/blob/master/src/java.base/share/man/keytool.md Provides instructions on how to list all available keytool commands or retrieve detailed help for a specific command. ```shell keytool --help keytool - --help ``` -------------------------------- ### Install Cross-Compiler on Build System Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs the necessary cross-compilers for AArch64 architecture on a Debian/Ubuntu system. ```bash apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu ``` -------------------------------- ### Start JFR Recording with Name Source: https://github.com/openjdk/jdk/blob/master/src/java.base/share/man/java.md Starts a JFR recording and assigns it a specific name and identifier. ```shell -XX:StartFlightRecording=name=MyRecording ``` -------------------------------- ### jps Command Examples Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jcmd/share/man/jps.md Demonstrates how to use the jps command to list instrumented JVMs. Examples cover listing JVMs on the local host, a remote host using the default RMI port, and a remote host with a non-default RMI port, including options to show long class names or main method arguments. ```bash jps 18027 Java2Demo.JAR 18032 jps 18005 jstat ``` ```bash jps -l remote.domain 3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR 2857 sun.tools.jstatd.jstatd ``` ```bash jps -m remote.domain:2002 3002 /opt/jdk1.7.0/demo/jfc/Java2D/Java2Demo.JAR 3102 sun.tools.jstatd.jstatd -p 2002 ``` -------------------------------- ### Configure and Install ccid Source: https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/smartcardio/README.txt Build and install the ccid package. This is a standard build process for the ccid component. ```bash ./configure ``` ```bash gnumake ``` ```bash gnumake install ``` -------------------------------- ### Enable binutils in configure Source: https://github.com/openjdk/jdk/blob/master/src/utils/hsdis/README.md Use the --with-hsdis=binutils option to enable building hsdis with binutils support. ```bash configure --with-hsdis=binutils ``` -------------------------------- ### Display All Configure Arguments Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Command to display all available configure arguments, including general autoconf options. ```bash bash configure --help ``` -------------------------------- ### Check libusb Installation Source: https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/smartcardio/README.txt Verify if libusb is installed by checking for its shared object file in /usr/lib. This is a prerequisite for MUSCLE. ```bash ls -l /usr/lib/libusb.so ``` -------------------------------- ### Install Autoconf on macOS Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs Autoconf on macOS using Homebrew. This is a prerequisite for configuring the JDK build on macOS. ```bash brew install autoconf ``` -------------------------------- ### Backing Style Example Source: https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html Illustrates the creation of a backing style for default component styling, ensuring default font, foreground, background, and opacity. ```APIDOC ## Backing Style ### Description In creating a Synth file, it's good practice to create a backing style that is used by all components. This will make sure that any components that do not match a specific style will have a default font, foreground, background and opacity. ### Method Not Applicable (XML Structure) ### Endpoint Not Applicable (XML Structure) ### Parameters None ### Request Example ```xml ``` ### Response #### Success Response (200) Not Applicable (XML Structure) #### Response Example None ``` -------------------------------- ### Create a Basic Runtime Image Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jlink/share/man/jlink.md Creates a runtime image in the 'greetingsapp' directory by linking the 'com.greetings' module from the 'mlib' directory. ```bash jlink --module-path mlib --add-modules com.greetings --output greetingsapp ``` -------------------------------- ### Install Autoconf on Fedora/CentOS/RHEL Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs Autoconf on rpm-based Linux systems. This tool is essential for generating build scripts. ```bash sudo yum install autoconf ``` -------------------------------- ### Install MSYS2 Packages Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs necessary packages for building the JDK on MSYS2 using the pacman package manager. ```bash pacman -S autoconf tar make zip unzip ``` -------------------------------- ### Build Failure Summary Example Source: https://github.com/openjdk/jdk/blob/master/doc/building.html This is a typical summary printed by the build system when a build fails. It highlights the failing target, command output, and make target chain. ```text ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code 2) === Output from failing command(s) repeated here === * For target hotspot_variant-server_libjvm_objs_psMemoryPool.o: /src/jdk/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type ... (rest of output omitted) * All command lines available in /src/jdk/build/linux-x64/make-support/failure-logs. === End of repeated output === === Make failed targets repeated here === lib/CompileJvm.gmk:207: recipe for target '/src/jdk/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed === End of repeated output === HELP: Try searching the build log for the name of the first failed target. HELP: Run 'make doctor' to diagnose build problems. ``` -------------------------------- ### Unrecognized VM option Error Example Source: https://github.com/openjdk/jdk/blob/master/src/java.base/share/man/java.md This is an example of the error message generated when an unrecognized VM option is used. ```text > Unrecognized VM option option-name ``` -------------------------------- ### JShell Class Initialization and Management Source: https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/share/data/symbols/jdk.jshell-9.sym.txt Demonstrates how to create and manage a JShell instance. Includes methods for building a JShell instance, performing source code analysis, and evaluating code snippets. ```java import jdk.jshell.JShell; // Create a JShell instance JShell js = JShell.create(); // Or use the builder for more configuration options // JShell.Builder builder = JShell.builder(); // JShell js = builder.build(); // Evaluate a piece of code js.eval("System.out.println(\"Hello, JShell!\");"); // Close the JShell instance when done js.close(); ``` -------------------------------- ### Install Autoconf on Alpine Linux Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs Autoconf on Alpine Linux. This ensures the build system can correctly configure the JDK. ```bash sudo apk add autoconf ``` -------------------------------- ### Configure OpenJDK Build Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Run the configure script to prepare the build environment. This script checks for dependencies and sets up build configurations. Follow any error messages for dependency resolution. ```bash bash configure ``` -------------------------------- ### Install Development Tools on Debian/Ubuntu Source: https://github.com/openjdk/jdk/blob/master/doc/building.html Installs essential build tools for apt-based Linux distributions like Debian and Ubuntu. ```bash sudo apt-get install build-essential autoconf ``` -------------------------------- ### Start Recording (Java) Source: https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/share/data/symbols/jdk.management.jfr-O.sym.txt Starts a Flight Recorder recording identified by its ID. Throws IllegalStateException if the recording is not in a startable state. ```Java void startRecording(long recordingId) throws IllegalStateException; ``` -------------------------------- ### Listing Startup Snippets in JShell Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jshell/share/man/jshell.md Shows how to list the default startup snippets loaded by JShell using the '/list -start' command. These are typically import statements for common Java packages. ```java jshell> /list -start s1 : import java.io.*; s2 : import java.math.*; s3 : import java.net.*; s4 : import java.nio.file.*; s5 : import java.util.*; s6 : import java.util.concurrent.*; s7 : import java.util.function.*; s8 : import java.util.prefs.*; s9 : import java.util.regex.*; s10 : import java.util.stream.*; jshell> ``` -------------------------------- ### Enable LLVM in configure Source: https://github.com/openjdk/jdk/blob/master/src/utils/hsdis/README.md Use the --with-hsdis=llvm option to enable building hsdis with LLVM support. ```bash configure --with-hsdis=llvm ``` -------------------------------- ### Install Visual Studio Build Tools for Windows AArch64 Source: https://github.com/openjdk/jdk/blob/master/doc/building.md Install Visual Studio 2022 Build Tools on a Windows AArch64 machine for native builds. This command installs core C++ build tools, ARM64 specific tools, and the Windows 11 SDK. ```batch vs_buildtools.exe --quiet --wait --norestart --nocache ^ --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^ --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ``` -------------------------------- ### Include directories and dependencies for sleefquad Source: https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/unix/native/libsleef/upstream/src/quad/CMakeLists.txt Configures include directories for the `qdispx2_obj` library and adds dependencies on generated files, SLEEF headers, and libraries. This ensures all necessary components are linked correctly. ```cmake target_include_directories(qdispx2_obj PRIVATE ${sleef_BINARY_DIR}/include) add_dependencies(qdispx2_obj qdispx2.c_generated qrenamedspx2.h_generated sleefquad_headers ${TARGET_LIBSLEEF} ${TARGET_HEADERS}) target_sources(sleefquad PRIVATE $) endif(DEFINED QMKDISP_PARAMS_X2) ``` -------------------------------- ### Install Interface Library Target Source: https://github.com/openjdk/jdk/blob/master/src/jdk.incubator.vector/unix/native/libsleef/upstream/src/libm/CMakeLists.txt Installs the INTERFACE library target for the inline headers, along with its include directories, for use by other projects. ```cmake install( TARGETS "${TARGET_INLINE_HEADERS}" EXPORT sleefTargets INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) ``` -------------------------------- ### jmod Command Example: Creating a JMOD Archive Source: https://github.com/openjdk/jdk/blob/master/src/jdk.jlink/share/man/jmod.md This example demonstrates how to create a JMOD archive using the jmod command with various options. It specifies the class path, module path, native commands, configuration files, header files, libraries, main class, man pages, module version, and target platform. ```bash create --class-path mods/com.greetings --module-path mlib \ --cmds commands --config configfiles --header-files src/h \ --libs lib --main-class com.greetings.Main \ --man-pages man --module-version 1.0 \ --target-platform "macos-aarch64" greetingsmod ``` -------------------------------- ### Key Generation and Management with Keytool Source: https://github.com/openjdk/jdk/blob/master/test/jdk/sun/security/tools/keytool/i18n.html Demonstrates the process of generating cryptographic keys, managing keystore passwords, and handling existing aliases using the keytool utility. It covers successful operations and expected error scenarios. ```bash keytool -genkey -keyalg DSA -v -keysize 512 -alias mykey2 -storepass password keytool -list -v -storepass password keytool -keypasswd -v -alias mykey2 -storepass password keytool -selfcert -v -alias mykey -storepass password ```