### Install SLEEF from Source Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.incubator.vector/unix/native/libsleef/upstream/README.md Install the built SLEEF library and headers to a specified directory using CMake's install command. ```bash cmake --install build --prefix= ``` -------------------------------- ### Install Cygwin Packages Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.html Installs essential packages for JDK building on Cygwin. Ensure the path to the Cygwin setup executable is correct. ```bash /setup-x86_64 -q -P autoconf -P make -P unzip -P zip ``` -------------------------------- ### Setup Configure Script for Bash Completion Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.md Create and install a helper script to enable bash completion for the configure script. This script ensures that bash correctly interprets `./configure` commands for completion. ```bash cat << EOT > /tmp/configure #!/bin/bash if [ $(pwd) = $(cd $(dirname $0); pwd) ] ; then echo >&2 "Abort: Trying to call configure helper recursively" exit 1 fi bash $PWD/configure "$@" EOT chmod +x /tmp/configure sudo mv /tmp/configure /usr/local/bin ``` -------------------------------- ### JWEBSERVER Startup Example Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.httpserver/share/man/jwebserver.md Example output upon successful startup of the jwebserver, indicating the binding address, port, and the directory being served. ```bash $ jwebserver Binding to loopback by default. For all interfaces use "-b 0.0.0.0" or "-b ::". Serving /cwd and subdirectories on 127.0.0.1 port 8000 URL http://127.0.0.1:8000/ ``` -------------------------------- ### Install SLEEF Library and Headers Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.incubator.vector/unix/native/libsleef/upstream/src/quad/CMakeLists.txt Installs the compiled SLEEF quad-precision library, headers, and runtime components to the appropriate system directories. ```cmake install( TARGETS sleefquad 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}" ) ``` -------------------------------- ### Basic JTreg Test Setup with IR Framework Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/hotspot/jtreg/compiler/lib/ir_framework/README.md This example demonstrates the basic structure of a JTreg test using the IR framework. It includes the necessary JTreg header, imports, and the main method to run the framework. The `@Test` and `@IR` annotations are used to define a test method and specify IR checking conditions. ```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() { /* ... */ } } ``` -------------------------------- ### BasicDesktopPaneUI Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt This section outlines the core methods available in the BasicDesktopPaneUI class, including UI creation, installation, uninstallation, and painting logic. ```APIDOC ## BasicDesktopPaneUI ### Description Provides the basic implementation of the DesktopPaneUI. ### Methods - **createUI(JComponent c)**: Creates a new instance of the UI delegate for the specified component. - **()**: Constructor for BasicDesktopPaneUI. - **installUI(JComponent c)**: Installs the UI delegate for the specified component. - **uninstallUI(JComponent c)**: Uninstalls the UI delegate for the specified component. - **installDefaults()**: Installs default properties for the desktop pane. - **uninstallDefaults()**: Uninstalls default properties. - **installListeners()**: Installs listeners for the desktop pane. - **uninstallListeners()**: Uninstalls listeners. - **installDesktopManager()**: Installs the desktop manager. - **uninstallDesktopManager()**: Uninstalls the desktop manager. - **installKeyboardActions()**: Installs keyboard actions. - **registerKeyboardActions()**: Registers keyboard actions. - **unregisterKeyboardActions()**: Unregisters keyboard actions. - **uninstallKeyboardActions()**: Uninstalls keyboard actions. - **paint(Graphics g, JComponent c)**: Paints the desktop pane. - **getPreferredSize(JComponent c)**: Returns the preferred size of the desktop pane. - **getMinimumSize(JComponent c)**: Returns the minimum size of the desktop pane. - **getMaximumSize(JComponent c)**: Returns the maximum size of the desktop pane. - **createPropertyChangeListener()**: Creates a property change listener. ``` -------------------------------- ### SynthPanelUI Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Provides methods for installing, uninstalling, and painting UI elements for SynthPanelUI. ```APIDOC ## SynthPanelUI ### Description Provides methods for managing the UI of a Synth-styled panel, including installation, uninstallation, and painting. ### Methods - **createUI(JComponent c)**: Creates a new instance of the UI delegate for the specified component. - **installUI(JComponent c)**: Installs the UI delegate for the specified component. - **uninstallUI(JComponent c)**: Uninstalls the UI delegate for the specified component. - **installListeners(JPanel p)**: Installs listeners for the panel. - **uninstallListeners(JPanel p)**: Uninstalls listeners for the panel. - **installDefaults(JPanel p)**: Installs default properties for the panel. - **uninstallDefaults(JPanel p)**: Uninstalls default properties for the panel. - **getContext(JComponent c)**: Retrieves the SynthContext for the component. - **update(Graphics g, JComponent c)**: Paints the component. - **paint(Graphics g, JComponent c)**: Paints the component. - **paint(SynthContext context, Graphics g)**: Paints the component using a SynthContext. - **paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)**: Paints the border of the component. - **propertyChange(PropertyChangeEvent evt)**: Handles property change events. ``` -------------------------------- ### javax.swing.plaf.basic.BasicToolTipUI Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Documentation for the BasicToolTipUI class, providing methods for creating, installing, and painting tooltips. ```APIDOC ## class javax/swing/plaf/basic/BasicToolTipUI ### Header Extends `javax/swing/plaf/ToolTipUI` ### Methods - `createUI(Ljavax/swing/JComponent;)Ljavax/swing/plaf/ComponentUI;` - `()V` - `installUI(Ljavax/swing/JComponent;)V` - `uninstallUI(Ljavax/swing/JComponent;)V` - `installDefaults(Ljavax/swing/JComponent;)V` - `uninstallDefaults(Ljavax/swing/JComponent;)V` - `installListeners(Ljavax/swing/JComponent;)V` - `uninstallListeners(Ljavax/swing/JComponent;)V` - `paint(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V` - `getPreferredSize(Ljavax/swing/JComponent;)Ljava/awt/Dimension;` - `getMinimumSize(Ljavax/swing/JComponent;)Ljava/awt/Dimension;` - `getMaximumSize(Ljavax/swing/JComponent;)Ljava/awt/Dimension;` ``` -------------------------------- ### Show All Configure Options Source: https://context7.com/jetbrains/jetbrainsruntime/llms.txt Display a short list of all available configuration options for the build system. Use this to explore customization possibilities. ```bash bash configure --help=short ``` -------------------------------- ### SourcePositions Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/jdk.compiler-9.sym.txt Provides methods to get the start and end positions of compilation units and trees. ```APIDOC ## getStartPosition ### Description Gets the starting position of a tree within a compilation unit. ### Signature (Lcom/sun/source/tree/CompilationUnitTree;Lcom/sun/source/tree/Tree;)J ``` ```APIDOC ## getEndPosition ### Description Gets the ending position of a tree within a compilation unit. ### Signature (Lcom/sun/source/tree/CompilationUnitTree;Lcom/sun/source/tree/Tree;)J ``` -------------------------------- ### com.sun.source.util.DocSourcePositions Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/jdk.compiler-9.sym.txt Provides methods to get the start and end positions of DocTree elements within a CompilationUnit. ```APIDOC ## DocSourcePositions ### Description Provides methods to retrieve the source code positions for DocTree elements. ### Methods #### getStartPosition - **Description**: Returns the starting position of a DocTree element. - **Signature**: `long getStartPosition(com.sun.source.tree.CompilationUnitTree, com.sun.source.doctree.DocCommentTree, com.sun.source.doctree.DocTree)` #### getEndPosition - **Description**: Returns the ending position of a DocTree element. - **Signature**: `long getEndPosition(com.sun.source.tree.CompilationUnitTree, com.sun.source.doctree.DocCommentTree, com.sun.source.doctree.DocTree)` ``` -------------------------------- ### Display all configure options Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.html Run this command to see a comprehensive list of all available configuration arguments for the build process. ```bash bash configure --help ``` -------------------------------- ### Clone the JDK Repository Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.html Use this command to get the complete source code of the main-line JDK repository. Ensure Git is installed. ```bash git clone https://git.openjdk.org/jdk ``` -------------------------------- ### Pre-configured Options File Example Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/java.base/share/man/keytool.md Defines default options for keytool commands in a properties file. 'keytool.all' applies to all commands, while specific commands override these defaults. Values can include system properties and should be quoted if they contain whitespace. ```properties # A tiny pre-configured options file keytool.all = -keystore ${user.home}/ks keytool.list = -v keytool.genkeypair = -keyalg rsa ``` -------------------------------- ### String substring Method (startIndex) Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/javax/swing/JEditorPane/LargeQuickDoc.txt Extracts a substring starting from a specified index to the end of the string. Useful for getting a suffix of a string. ```apex String s1 = 'hamburger'; System.assertEquals('burger', s1.substring(3)); ``` -------------------------------- ### XMLEvent Interface Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.xml-8.sym.txt The base interface for all XML stream events. Provides methods to get the event type, location, and check if it's a start element. ```APIDOC ## XMLEvent Interface ### Description The base interface for all XML stream events. Provides methods to get the event type, location, and check if it's a start element. ### Methods - **getEventType** ()I - Retrieves the type of the event. - **getLocation** ()Ljavax/xml/stream/Location; - Retrieves the location of the event. - **isStartElement** ()Z - Checks if the event is a start element event. ``` -------------------------------- ### Example jmod Options File Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.jlink/share/man/jmod.md This example demonstrates how to use an options file to specify various arguments for the jmod create command. Options can be spread across multiple lines, and comments can be added using the '#' symbol. ```shell #Wed Dec 07 00:40:19 EST 2016 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 ``` -------------------------------- ### ComponentUI Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Core methods for UI components, including installation, uninstallation, painting, and size calculations. ```APIDOC ## javax/swing/plaf/ComponentUI ### Description Core methods for UI components, including installation, uninstallation, painting, and size calculations. ### Methods - **installUI** (Ljavax/swing/JComponent;)V - **uninstallUI** (Ljavax/swing/JComponent;)V - **paint** (Ljava/awt/Graphics;Ljavax/swing/JComponent;)V - **update** (Ljava/awt/Graphics;Ljavax/swing/JComponent;)V - **getPreferredSize** (Ljavax/swing/JComponent;)Ljava/awt/Dimension; - **getMinimumSize** (Ljavax/swing/JComponent;)Ljava/awt/Dimension; - **getMaximumSize** (Ljavax/swing/JComponent;)Ljava/awt/Dimension; - **contains** (Ljavax/swing/JComponent;II)Z - **createUI** (Ljavax/swing/JComponent;)Ljavax/swing/plaf/ComponentUI; - **getBaseline** (Ljavax/swing/JComponent;II)I - **getBaselineResizeBehavior** (Ljavax/swing/JComponent;)Ljava/awt/Component$BaselineResizeBehavior; - **getAccessibleChildrenCount** (Ljavax/swing/JComponent;)I - **getAccessibleChild** (Ljavax/swing/JComponent;I)Ljavax/accessibility/Accessible; ``` -------------------------------- ### Print Help Text Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/cli/help-linux.txt The --help option prints the usage text with a list and description of each valid option for the current platform to the output stream and exits. ```bash --help -h -? ``` -------------------------------- ### StartElement Event Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.xml-8.sym.txt Represents the start of an XML element event. Provides methods to get the element's name, attributes, namespaces, and namespace context. ```APIDOC ## StartElement Event ### Description Represents the start of an XML element event. Provides methods to get the element's name, attributes, namespaces, and namespace context. ### Methods - **getName** ()Ljavax/xml/namespace/QName; - Retrieves the qualified name of the element. - **getAttributes** ()Ljava/util/Iterator; - Retrieves an iterator for the attributes. - **getNamespaces** ()Ljava/util/Iterator; - Retrieves an iterator for the namespaces. - **getAttributeByName** (Ljavax/xml/namespace/QName;)Ljavax/xml/stream/events/Attribute; - Retrieves an attribute by its qualified name. - **getNamespaceContext** ()Ljavax/xml/namespace/NamespaceContext; - Retrieves the namespace context. - **getNamespaceURI** (Ljava/lang/String;)Ljava/lang/String; - Retrieves the namespace URI for a given prefix. ``` -------------------------------- ### BasicSpinnerUI Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Provides methods for creating and managing the UI of a JSpinner, including installation, uninstallation, and layout. ```APIDOC ## class javax/swing/plaf/basic/BasicSpinnerUI ### Description Provides the basic UI delegate for `JSpinner`. ### Methods - **** ()V - **createUI** (Ljavax/swing/JComponent;)Ljavax/swing/plaf/ComponentUI; - **installUI** (Ljavax/swing/JComponent;)V - **uninstallUI** (Ljavax/swing/JComponent;)V - **installListeners** ()V - **uninstallListeners** ()V - **installDefaults** ()V - **uninstallDefaults** ()V - **installNextButtonListeners** (Ljava/awt/Component;)V - **installPreviousButtonListeners** (Ljava/awt/Component;)V - **createLayout** ()Ljava/awt/LayoutManager; - **createPropertyChangeListener** ()Ljava/beans/PropertyChangeListener; - **createPreviousButton** ()Ljava/awt/Component; - **createNextButton** ()Ljava/awt/Component; - **createEditor** ()Ljavax/swing/JComponent; - **replaceEditor** (Ljavax/swing/JComponent;Ljavax/swing/JComponent;)V - **installKeyboardActions** ()V - **getBaseline** (Ljavax/swing/JComponent;II)I - **getBaselineResizeBehavior** (Ljavax/swing/JComponent;)Ljava/awt/Component$BaselineResizeBehavior; ``` -------------------------------- ### StartDocument Event Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.xml-8.sym.txt Represents the start of an XML document event. Provides methods to get document information like system ID, encoding, standalone status, and version. ```APIDOC ## StartDocument Event ### Description Represents the start of an XML document event. Provides methods to get document information like system ID, encoding, standalone status, and version. ### Methods - **getSystemId** ()Ljava/lang/String; - Retrieves the system identifier of the document. - **getCharacterEncodingScheme** ()Ljava/lang/String; - Retrieves the character encoding scheme. - **encodingSet** ()Z - Checks if the encoding has been set. - **isStandalone** ()Z - Checks if the document is standalone. - **standaloneSet** ()Z - Checks if the standalone status has been set. - **getVersion** ()Ljava/lang/String; - Retrieves the XML version. ``` -------------------------------- ### Create Devkits for Multiple Targets Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.md This example demonstrates creating devkits for ppc64le and aarch64 targets using Fedora as the base OS. After a successful build, the devkits will be located in the build/devkit/result subdirectory. ```bash cd make/devkit make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21 ls -1 ../../build/devkit/result/ ``` -------------------------------- ### Applet Location and Size Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Methods for getting and setting the location, size, and bounds of the Applet. ```APIDOC ## getLocation ### Description Gets the location of the applet. ### Method `getLocation()` `getLocation(java.awt.Point rv)` ### Parameters - **rv** (java.awt.Point) - The point to store the location in (optional). ### Response - `java.awt.Point` - The location of the applet. ## getLocationOnScreen ### Description Gets the location of the applet on the screen. ### Method `getLocationOnScreen()` ### Parameters None ### Response - `java.awt.Point` - The location on the screen. ## location ### Description Gets the location of the applet. This method is deprecated. ### Method `location()` ### Parameters None ### Response - `java.awt.Point` - The location of the applet. ## setLocation ### Description Sets the location of the applet. ### Method `setLocation(int x, int y)` `setLocation(java.awt.Point p)` ### Parameters - **x** (int) - The new x-coordinate. - **y** (int) - The new y-coordinate. - **p** (java.awt.Point) - The new location. ### Response None ## move ### Description Moves the applet to a new location. This method is deprecated. ### Method `move(int x, int y)` ### Parameters - **x** (int) - The new x-coordinate. - **y** (int) - The new y-coordinate. ### Response None ## getSize ### Description Gets the size of the applet. ### Method `getSize()` `getSize(java.awt.Dimension rv)` ### Parameters - **rv** (java.awt.Dimension) - The dimension to store the size in (optional). ### Response - `java.awt.Dimension` - The size of the applet. ## size ### Description Gets the size of the applet. This method is deprecated. ### Method `size()` ### Parameters None ### Response - `java.awt.Dimension` - The size of the applet. ## setSize ### Description Sets the size of the applet. ### Method `setSize(int width, int height)` `setSize(java.awt.Dimension d)` ### Parameters - **width** (int) - The new width. - **height** (int) - The new height. - **d** (java.awt.Dimension) - The new size. ### Response None ## resize ### Description Resizes the applet. This method is deprecated. ### Method `resize(int width, int height)` `resize(java.awt.Dimension d)` ### Parameters - **width** (int) - The new width. - **height** (int) - The new height. - **d** (java.awt.Dimension) - The new size. ### Response None ## getBounds ### Description Gets the bounding rectangle of the applet. ### Method `getBounds()` `getBounds(java.awt.Rectangle rv)` ### Parameters - **rv** (java.awt.Rectangle) - The rectangle to store the bounds in (optional). ### Response - `java.awt.Rectangle` - The bounding rectangle. ## bounds ### Description Gets the bounding rectangle of the applet. This method is deprecated. ### Method `bounds()` ### Parameters None ### Response - `java.awt.Rectangle` - The bounding rectangle. ## setBounds ### Description Sets the bounds of the applet. ### Method `setBounds(int x, int y, int width, int height)` `setBounds(java.awt.Rectangle r)` ### Parameters - **x** (int) - The new x-coordinate. - **y** (int) - The new y-coordinate. - **width** (int) - The new width. - **height** (int) - The new height. - **r** (java.awt.Rectangle) - The new bounds. ### Response None ## reshape ### Description Reshapes the applet. This method is deprecated. ### Method `reshape(int x, int y, int width, int height)` ### Parameters - **x** (int) - The new x-coordinate. - **y** (int) - The new y-coordinate. - **width** (int) - The new width. - **height** (int) - The new height. ### Response None ## getX ### Description Gets the x-coordinate of the applet's location. ### Method `getX()` ### Parameters None ### Response - `int` - The x-coordinate. ## getY ### Description Gets the y-coordinate of the applet's location. ### Method `getY()` ### Parameters None ### Response - `int` - The y-coordinate. ## getWidth ### Description Gets the width of the applet. ### Method `getWidth()` ### Parameters None ### Response - `int` - The width. ## getHeight ### Description Gets the height of the applet. ### Method `getHeight()` ### Parameters None ### Response - `int` - The height. ``` -------------------------------- ### Build Configuration from Directory Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.html Execute `make` within the specific configuration directory for building. ```bash cd build/ && make ``` -------------------------------- ### SynthSeparatorUI Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Provides methods for installing, uninstalling, and painting Synth-based separators, along with methods for determining preferred, minimum, and maximum sizes. ```APIDOC ## SynthSeparatorUI ### Description UI delegate for JSeparator components using the Synth Look and Feel. ### Methods - `createUI(JComponent c)`: Creates a new instance of the UI delegate. - `installUI(JComponent c)`: Installs the UI delegate for the given component. - `uninstallUI(JComponent c)`: Uninstalls the UI delegate from the component. - `installDefaults(JSeparator s)`: Installs default properties for the separator. - `uninstallDefaults(JSeparator s)`: Uninstalls default properties from the separator. - `installListeners(JSeparator s)`: Installs listeners for the separator. - `uninstallListeners(JSeparator s)`: Uninstalls listeners from the separator. - `update(Graphics g, JComponent c)`: Paints the separator. - `paint(Graphics g, JComponent c)`: Paints the separator. - `paint(SynthContext context, Graphics g)`: Paints the separator using Synth context. - `paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)`: Paints the border of the separator. - `getPreferredSize(JComponent c)`: Returns the preferred size of the separator. - `getMinimumSize(JComponent c)`: Returns the minimum size of the separator. - `getMaximumSize(JComponent c)`: Returns the maximum size of the separator. - `getContext(JComponent c)`: Retrieves the Synth context for the component. - `propertyChange(PropertyChangeEvent evt)`: Handles property change events. ``` -------------------------------- ### Get Common Prefix of Strings Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/javax/swing/JEditorPane/LargeQuickDoc.txt Returns the initial sequence of characters as a String that is common to all the specified Strings. Use this when you need to find the longest common starting substring among a list of strings. ```apex List ls = new List{'SFDCApex', 'SFDCVisualforce'} String prefix = String.getCommonPrefix(ls) System.assertEquals('SFDC', prefix) ``` -------------------------------- ### Configure for 32-bit Windows build with FreeType2 Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.html Example of configuring a 32-bit build for Windows, specifying a custom path for FreeType2. ```bash bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32 ``` -------------------------------- ### Size and Layout Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Methods for setting and getting preferred, maximum, and minimum sizes, as well as insets. ```APIDOC ## getFontMetrics ### Description Returns the FontMetrics object for the specified Font. ### Method `getFontMetrics(java.awt.Font font)` ### Parameters - **font** (java.awt.Font) - The font for which to get the FontMetrics. ### Returns - (java.awt.FontMetrics) - The FontMetrics object for the specified font. ## setPreferredSize ### Description Sets the preferred size of the component. ### Method `setPreferredSize(java.awt.Dimension preferredSize)` ### Parameters - **preferredSize** (java.awt.Dimension) - The preferred size of the component. ## getPreferredSize ### Description Gets the preferred size of the component. ### Method `getPreferredSize()` ### Returns - (java.awt.Dimension) - The preferred size of the component. ## setMaximumSize ### Description Sets the maximum size of the component. ### Method `setMaximumSize(java.awt.Dimension maximumSize)` ### Parameters - **maximumSize** (java.awt.Dimension) - The maximum size of the component. ## getMaximumSize ### Description Gets the maximum size of the component. ### Method `getMaximumSize()` ### Returns - (java.awt.Dimension) - The maximum size of the component. ## setMinimumSize ### Description Sets the minimum size of the component. ### Method `setMinimumSize(java.awt.Dimension minimumSize)` ### Parameters - **minimumSize** (java.awt.Dimension) - The minimum size of the component. ## getMinimumSize ### Description Gets the minimum size of the component. ### Method `getMinimumSize()` ### Returns - (java.awt.Dimension) - The minimum size of the component. ## getInsets ### Description Gets the insets of the container. ### Method `getInsets()` ### Returns - (java.awt.Insets) - The insets of the container. ## getInsets ### Description Copies the insets of the container to the specified Insets object. ### Method `getInsets(java.awt.Insets insets)` ### Parameters - **insets** (java.awt.Insets) - The Insets object to receive the insets. ### Returns - (java.awt.Insets) - The specified Insets object with the insets copied into it. ``` -------------------------------- ### Basic Compile Framework Usage Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/hotspot/jtreg/compiler/lib/compile_framework/README.md Demonstrates the fundamental steps of creating a CompileFramework instance, adding Java source code, compiling it, and invoking a method. ```Java // Create a new CompileFramework instance. CompileFramework compileFramework = new CompileFramework(); // Add a java source file. compileFramework.addJavaSourceCode("XYZ", ""); // Compile the source file. compileFramework.compile(); // Object returnValue = XYZ.test(5); Object returnValue = compileFramework.invoke("XYZ", "test", new Object[] {5}); ``` -------------------------------- ### Install SLEEF using Spack Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.incubator.vector/unix/native/libsleef/upstream/README.md Install SLEEF directly using the Spack package manager. This command installs the master branch. ```bash spack install sleef@master ``` -------------------------------- ### Launch JWEBSERVER Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.httpserver/share/man/jwebserver.md Launches the Simple Web Server with default settings. Startup success messages indicate the local address and directory being served. ```bash $ jwebserver ``` -------------------------------- ### Run Configure Script Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.html Execute the configure script to set up the build environment. This is a standard step before building. ```bash bash configure ``` -------------------------------- ### XCB Install Colormap Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/build/ResolveSymbolsTest/externalLibs/x86_64/libxcb.so.1.txt Installs a colormap. ```APIDOC ## xcb_install_colormap ### Description Installs a colormap. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Applet Methods Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt Provides details on methods available in the Applet class, including UI creation, default installations, and painting. ```APIDOC ## Applet Methods ### Description Methods for managing the UI, defaults, listeners, and painting of an Applet. ### Methods - `()` - `createUI(JComponent)` - `installDefaults(AbstractButton)` - `installListeners(AbstractButton)` - `uninstallListeners(AbstractButton)` - `uninstallDefaults(AbstractButton)` - `getContext(JComponent)` - `getBaseline(JComponent, int, int)` - `update(Graphics, JComponent)` - `paint(Graphics, JComponent)` - `paint(SynthContext, Graphics)` - `paintBorder(SynthContext, Graphics, int, int, int, int)` - `getDefaultIcon(AbstractButton)` - `getIcon(AbstractButton)` - `getMinimumSize(JComponent)` - `getPreferredSize(JComponent)` - `getMaximumSize(JComponent)` - `getSizingIcon(AbstractButton)` - `propertyChange(PropertyChangeEvent)` ``` -------------------------------- ### Basic configure script invocation Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.html Use this command to start the configuration process for building the JDK. It sets up the output directory and build environment. ```bash bash configure [options] ``` -------------------------------- ### RSAES-OAEP Encryption Example 4.3 Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/com/sun/crypto/provider/Cipher/RSA/oaep-vect.txt This snippet presents a third RSAES-OAEP encryption example with a distinct message and seed, utilizing the 1027-bit RSA key. It is part of the RSAES-OAEP encryption examples. ```text # Message to be encrypted: bf 6d 42 e7 01 70 7b 1d 02 06 b0 c8 b4 5a 1c 72 64 1f f1 28 89 21 9a 82 bd ea 96 5b 5e 79 a9 6b 0d 01 63 ed 9d 57 8e c9 ad a2 0f 2f bc f1 ea 3c 40 89 d8 34 19 ba 81 b0 c6 0f 36 06 da 99 # Seed: ad 99 7f ee f7 30 d6 ea 7b e6 0d 0d c5 2e 72 ea cb fd d2 75 ``` -------------------------------- ### RSAES-OAEP Encryption Example 4.2 Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/com/sun/crypto/provider/Cipher/RSA/oaep-vect.txt This snippet shows another RSAES-OAEP encryption example with a different message and seed, using the same 1027-bit RSA key. It is part of the RSAES-OAEP encryption examples. ```text # Message to be encrypted: b0 ad c4 f3 fe 11 da 59 ce 99 27 73 d9 05 99 43 c0 30 46 49 7e e9 d9 f9 a0 6d f1 16 6d b4 6d 98 f5 8d 27 ec 07 4c 02 ee e6 cb e2 44 9c 8b 9f c5 08 0c 5c 3f 44 33 09 25 12 ec 46 aa 79 37 43 c8 # Seed: f5 45 d5 89 75 85 e3 db 71 aa 0c b8 da 76 c5 1d 03 2a e9 63 # Encryption: 00 97 b6 98 c6 16 56 45 b3 03 48 6f bf 5a 2a 44 79 c0 ee 85 88 9b 54 1a 6f 0b 85 8d 6b 65 97 b1 3b 85 4e b4 f8 39 af 03 39 9a 80 d7 9b da 65 78 c8 41 f9 0d 64 57 15 b2 80 d3 71 43 99 2d d1 86 c8 0b 94 9b 77 5c ae 97 37 0e 4e c9 74 43 13 6c 6d a4 84 e9 70 ff db 13 23 a2 08 47 82 1d 3b 18 38 1d e1 3b b4 9a ae a6 65 30 c4 a4 b8 27 1f 3e ae 17 2c d3 66 e0 7e 66 36 f1 01 9d 2a 28 ae d1 5e ``` -------------------------------- ### View J2D Demo Command Line Options Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/demo/share/jfc/J2Ddemo/README.txt Display all available command-line options for customizing J2D demo runs. ```bash java -jar J2Ddemo.jar -help ``` -------------------------------- ### Install libdft Target and Components Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.incubator.vector/unix/native/libsleef/upstream/src/dft/CMakeLists.txt Installs the libdft library, its headers, and related components (runtime and development) to the appropriate directories based on CMake installation variables. This makes the library available for use by other projects. ```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}" ) ``` -------------------------------- ### splitPath Example Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/javax/swing/JEditorPane/LargeQuickDoc.txt An example method demonstrating how to use the split method to extract the filename from a path. ```APIDOC ## splitPath Example ### Description This method splits a given filename string using a backslash as a delimiter and returns the last part of the path, which is typically the filename. ### Method Signature public String splitPath(String filename) ### Parameters #### Path Parameters - **filename** (String) - The full path of the file. ### Request Example ```java public String splitPath(String filename) { if (filename == null) return null; List parts = filename.split('\\'); filename = parts[parts.size()-1]; return filename; } // For example, if the file path is e:\\processed\\PPDSF100111.csv // This method splits the path and returns the last part. // Returned filename is PPDSF100111.csv ``` ### Response #### Success Response (String) - Returns the extracted filename from the path. ``` -------------------------------- ### JDK Build Failure Summary Example Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.md This example shows the output format of a build failure summary, which helps pinpoint the cause of compilation errors by repeating failing command output and make target chains. ```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. ``` -------------------------------- ### XCB Setup Failed Next Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/build/ResolveSymbolsTest/externalLibs/x86_64/libxcb.so.1.txt Processes the next step in a failed X server setup. ```APIDOC ## xcb_setup_failed_next ### Description Processes the next step in a failed X server setup. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Create Certificate Chain with Keytool Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/java.base/share/man/keytool.md Demonstrates creating a certificate chain by signing certificates with different aliases. This involves generating a certificate request, signing it, and importing the signed certificate. ```bash keytool -alias ca1 -certreq | \ keytool -alias ca -gencert -ext san=dns:ca1 | \ keytool -alias ca1 -importcert keytool -alias ca2 -certreq | \ keytool -alias ca1 -gencert -ext san=dns:ca2 | \ keytool -alias ca2 -importcert ``` -------------------------------- ### XCB Setup and Authentication Functions Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/build/ResolveSymbolsTest/externalLibs/aarch64/libxcb.so.1.txt Functions related to the X server setup and authentication process. ```APIDOC ## xcb_setup_request_end ### Description Ends the setup request process. ### Method `xcb_setup_request_end` ### Endpoint N/A (Library function) ### Parameters None ### Request Example ```c xcb_setup_request_end(connection, reply); ``` ### Response None ``` ```APIDOC ## xcb_setup_authenticate_reason ### Description Retrieves the reason for authentication failure during X server setup. ### Method `xcb_setup_authenticate_reason` ### Endpoint N/A (Library function) ### Parameters - `reason` (const char **) - Pointer to store the authentication reason string. ### Request Example ```c const char *reason_str; xcb_setup_authenticate_reason(connection, &reason_str); ``` ### Response None ``` ```APIDOC ## xcb_setup_authenticate_reason_length ### Description Retrieves the length of the authentication reason string. ### Method `xcb_setup_authenticate_reason_length` ### Endpoint N/A (Library function) ### Parameters None ### Request Example ```c size_t length = xcb_setup_authenticate_reason_length(connection); ``` ### Response Returns the length of the reason string. ``` ```APIDOC ## xcb_setup_authenticate_reason_end ### Description Ends the retrieval of the authentication reason. ### Method `xcb_setup_authenticate_reason_end` ### Endpoint N/A (Library function) ### Parameters None ### Request Example ```c xcb_setup_authenticate_reason_end(connection, reply); ``` ### Response None ``` ```APIDOC ## xcb_setup_authenticate_sizeof ### Description Returns the size in bytes of the `xcb_setup_authenticate_request_t` structure. ### Method `xcb_setup_authenticate_sizeof` ### Endpoint N/A (Library function) ### Parameters None ### Request Example ```c size_t size = xcb_setup_authenticate_sizeof(connection); ``` ### Response Returns the size of the structure. ``` -------------------------------- ### Build Module Phase Target Example Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/doc/building.md Builds a specific phase for a given module and its dependencies. Replace '' and '' with the appropriate names. ```bash make - ``` -------------------------------- ### Keytool Command with Options File Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/java.base/share/man/keytool.md Demonstrates how a keytool command with a pre-configured options file is processed. Options from the file are prepended to the command line, with command-specific options overriding general ones. ```bash keytool -conf preconfig -list ``` ```bash keytool -keystore ~/ks -v -list ``` ```bash keytool -conf preconfig -genkeypair -alias me ``` ```bash keytool -keystore ~/ks -keyalg rsa -genkeypair -alias me ``` ```bash keytool -conf preconfig -genkeypair -alias you -keyalg ec ``` ```bash keytool -keystore ~/ks -keyalg rsa -genkeypair -alias you -keyalg ec ``` ```bash keytool -keystore ~/ks -genkeypair -alias you -keyalg ec ``` -------------------------------- ### XCB Get Input Focus Unchecked Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/build/ResolveSymbolsTest/externalLibs/x86_64/libxcb.so.1.txt Gets the input focus without checking for errors. ```APIDOC ## xcb_get_input_focus_unchecked ### Description Gets the input focus without checking for errors. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### XCB Get Input Focus Reply Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/jb/build/ResolveSymbolsTest/externalLibs/x86_64/libxcb.so.1.txt Retrieves the reply for a get input focus request. ```APIDOC ## xcb_get_input_focus_reply ### Description Retrieves the reply for a get input focus request. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Plugin.autoStart Method Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.compiler/share/data/symbols/jdk.compiler-E.sym.txt Determines if a plugin should automatically start. ```APIDOC ## Plugin.autoStart ### Description Checks if the plugin should be automatically started. ### Method - `autoStart()`: Returns `true` if the plugin should auto-start, `false` otherwise. ``` -------------------------------- ### RSAES-OAEP Encryption Example 8.5 Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/com/sun/crypto/provider/Cipher/RSA/oaep-vect.txt This snippet provides an example of RSAES-OAEP encryption with a different message and seed. ```text # Message to be encrypted: 4a 5f 49 14 be e2 5d e3 c6 93 41 de 07 # Seed: ec c6 3b 28 f0 75 6f 22 f5 2a c8 e6 ec 12 51 a6 ec 30 47 18 # Encryption: 1f b9 35 6f d5 c4 b1 79 6d b2 eb f7 d0 d3 93 cc 81 0a df 61 45 de fc 2f ce 71 4f 79 d9 38 00 d5 e2 ac 21 1e a8 bb ec ca 4b 65 4b 94 c3 b1 8b 30 dd 57 6c e3 4d c9 54 36 ef 57 a0 94 15 64 59 23 35 9a 5d 7b 41 71 ef 22 c2 46 70 f1 b2 29 d3 60 3e 91 f7 66 71 b7 df 97 e7 31 7c 97 73 44 76 d5 f3 d1 7d 21 cf 82 b5 ba 9f 83 df 2e 58 8d 36 98 4f d1 b5 84 46 8b d2 3b 2e 87 5f 32 f6 89 53 f7 b2 ``` -------------------------------- ### RSAES-OAEP Encryption Example 8.2 Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/test/jdk/com/sun/crypto/provider/Cipher/RSA/oaep-vect.txt This snippet shows an example of RSAES-OAEP encryption with a specific message and seed. ```text # Message to be encrypted: 4e b6 8d cd 93 ca 9b 19 df 11 1b d4 36 08 f5 57 02 6f e4 aa 1d 5c fa c2 27 a3 eb 5a b9 54 8c 18 a0 6d de d2 3f 81 82 59 86 b2 fc d7 11 09 ec ef 7e ff 88 87 3f 07 5c 2a a0 c4 69 f6 9c 92 bc # Seed: a3 71 7d a1 43 b4 dc ff bc 74 26 65 a8 fa 95 05 85 54 83 43 # Encryption: 2e cf 15 c9 7c 5a 15 b1 47 6a e9 86 b3 71 b5 7a 24 28 4f 4a 16 2a 8d 0c 81 82 e7 90 5e 79 22 56 f1 81 2b a5 f8 3f 1f 7a 13 0e 42 dc c0 22 32 84 4e dc 14 a3 1a 68 ee 97 ae 56 4a 38 3a 34 11 65 64 24 c5 f6 2d db 64 60 93 c3 67 be 1f cd a4 26 cf 00 a0 6d 8a cb 7e 57 77 6f bb d8 55 ac 3d f5 06 fc 16 b1 d7 c3 f2 11 0f 3d 80 68 e9 1e 18 63 63 83 1c 84 09 68 0d 8d a9 ec d8 cf 1f a2 0e e3 9d ``` -------------------------------- ### Uninstall SLEEF Library Source: https://github.com/jetbrains/jetbrainsruntime/blob/main/src/jdk.incubator.vector/unix/native/libsleef/upstream/README.md Remove the installed SLEEF library and headers by executing a command that reads the installation manifest. ```bash sudo xargs rm -v < build/install_manifest.txt ```