You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2026/05/29 00:27:06 UTC
(datasketches-memory) branch update_7.0.X updated: Remove old documents that are irrelevant.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch update_7.0.X
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
The following commit(s) were added to refs/heads/update_7.0.X by this push:
new 9de59825 Remove old documents that are irrelevant.
9de59825 is described below
commit 9de59825f3423de8551a02a22cf269a66a246f6a
Author: Lee Rhodes <le...@gmail.com>
AuthorDate: Thu May 28 17:25:58 2026 -0700
Remove old documents that are irrelevant.
---
.../apache/datasketches/memory/package-info.java | 6 +
docs/eclipse.md | 150 ---------------
docs/img/eclipse-build-path-1.png | Bin 164702 -> 0 bytes
docs/img/eclipse-build-path-2.png | Bin 164750 -> 0 bytes
docs/img/eclipse-compiler-level.png | Bin 168939 -> 0 bytes
docs/img/eclipse-java-compiler-arguments-1.png | Bin 202076 -> 0 bytes
docs/img/eclipse-java-compiler-arguments-2.png | Bin 158082 -> 0 bytes
docs/img/eclipse-project-structure.png | Bin 222353 -> 0 bytes
docs/img/intellij-java-compiler-arguments.png | Bin 126551 -> 0 bytes
docs/img/intellij-project-structure.png | Bin 125666 -> 0 bytes
docs/img/mr-jar-manifest.png | Bin 362822 -> 0 bytes
docs/img/mr-jar-sources.png | Bin 25751 -> 0 bytes
docs/intellij.md | 75 --------
docs/maven-toolchains.md | 79 --------
docs/module-system.md | 106 -----------
docs/multi-release-jar.md | 56 ------
docs/usage-examples.md | 204 ---------------------
17 files changed, 6 insertions(+), 670 deletions(-)
diff --git a/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/package-info.java b/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/package-info.java
index 769cee00..72d58c28 100644
--- a/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/package-info.java
+++ b/datasketches-memory-java11/src/main/java/org/apache/datasketches/memory/package-info.java
@@ -17,4 +17,10 @@
* under the License.
*/
+/**
+ * This package defines the interfaces for the DataSketches-Memory project for Java 11.
+ *
+ * @author Lee Rhodes
+ */
package org.apache.datasketches.memory;
+
diff --git a/docs/eclipse.md b/docs/eclipse.md
deleted file mode 100644
index 1ca35f21..00000000
--- a/docs/eclipse.md
+++ /dev/null
@@ -1,150 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-
-# Eclipse IDE Setup
-
-The use of Maven submodules to build a Multi Release JAR was motivated by its compatibility with
-popular IDEs. There are two configuration properties to be aware of when configuring your local
-development environment:
-
-1) Java compiler versions
-2) Compiler arguments for JPMS
-
-### Java compiler versions
-
-Settings are usually synchronized with Maven Toolchain configuration, otherwise the Java version
-for a Maven module should be set as follows:
-
-| Maven submodule | JDK |
-| -------------------------- | --- |
-| datasketches-memory | 8 |
-| datasketches-memory-java8 | 8 |
-| datasketches-memory-java11 | 11 |
-
-### Compiler arguments for JPMS
-
-In order to compile Maven modules in Java versions 11 and above, it is necessary to provide the
-following arguments to the compiler. These are usually synchronized with the `pom.xml`
-configuration:
-
-```xml
- <compilerArgs>
- <arg>--add-exports</arg>
- <arg>java.base/jdk.internal.ref=org.apache.datasketches.memory</arg>
- </compilerArgs>
-```
-
----
-
-## Running Datasketches-Memory in Eclipse
-
-Note that the following configuration was verified using Eclipse Version: 2020-12 (4.18.0)
-
-### The eclipse maven plugin
-
-The [Eclipse Maven plugin](https://maven.apache.org/plugins/maven-eclipse-plugin/) is used to
-generate Eclipse IDE files. In order to run the eclipse plugin use:
-
- $ mvn clean eclipse:eclipse -DskipTests=true
-
-More information about using the eclipse plugin with multi-module Maven builds can be found
-in the Maven
-[Multiple Module Projects](https://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html)
-document.
-
-Please note that this plugin is retired and no longer maintained!
-
----
-
-### Importing the project into eclipse
-
-From the **Package Explorer** View:
-
-- Right-click on a blank space in the view
-- Select **Import/Maven/Existing Maven Projects**
-- Select **Next**, and browse to the project directory
-- Click **Open**
-
----
-
-### Setting compiler arguments for JPMS
-
-Although these should be set automatically, the Eclipse IDE does not currently configure these
-settings according to the `pom.xml` - see this
-[Eclipse Bug](https://github.com/eclipse-m2e/m2e-core/issues/129).
-Ensure that the required JPMS arguments are set for the compiler (Java 11 only).
-
-- First, right-click on the `datasketches-memory-java11` project, and select
-**Properties/Java Build Path**.
-- Next, open the **Module Dependencies** tab and select the `java.base` package.
-- Click on **Configured details**, followed by **Expose package**.
-- In the dialog box, enter package: ```jdk.internal.ref```, and
-`org.apache.datasketches.memory` as the target module.
-- Ensure that the **exports** checkbox is selected.
-
-
-
-- Finally, click **Apply and Close**:
-
-
-
-Note: These arguments need only be supplied for `datasketches-memory-java11`.
-
----
-
-### Setting Java compiler settings
-
-This should be set automatically by the IDE. However, you may ensure that the correct Java
-compliance level is set for each module by using the Eclipse `Java Compiler` dialog.
-
-- Open the **Java Compiler** dialog, and ensure **Enable project specific settings** is checked:
-
-
-
-You might need to verify this for each module, making sure the correct compliance level is used:
-
-- `datasketches-memory-java11` should use level 11 compliance.
-- `datasketches-memory-java8` should use level 1.8 compliance.
-
----
-
-### Setting JRE library versions
-
-This should be set automatically by the IDE. However, you may ensure that the correct JRE is
-used for each module by using the Eclipse **Java Build Path** dialog.
-
-- First, open the project properties dialog for the `datasketches-memory-java11` project, and
-click on **Java Build Path**.
-- Next, open the **Libraries** tab and select the **JRE System Library** under **Modulepath**.
-- Click **Edit** and ensure that the **Execution Environment** is selected and set to Java 11:
-
-
-
-- Lastly, for all other modules, verify that the **Execution Environment** is selected and set
-to the Java 8 JRE:
-
-
-
-### Running unit tests
-
-- Under the `datasketches-memory-java8` module, right-click on the `src/test/java`
-directory.
-- Select **Run-As** / **TestNG Test**
-- It should open a new window and run over 400 tests without error.
diff --git a/docs/img/eclipse-build-path-1.png b/docs/img/eclipse-build-path-1.png
deleted file mode 100644
index f815f869..00000000
Binary files a/docs/img/eclipse-build-path-1.png and /dev/null differ
diff --git a/docs/img/eclipse-build-path-2.png b/docs/img/eclipse-build-path-2.png
deleted file mode 100644
index 0a824d30..00000000
Binary files a/docs/img/eclipse-build-path-2.png and /dev/null differ
diff --git a/docs/img/eclipse-compiler-level.png b/docs/img/eclipse-compiler-level.png
deleted file mode 100644
index ff308c4d..00000000
Binary files a/docs/img/eclipse-compiler-level.png and /dev/null differ
diff --git a/docs/img/eclipse-java-compiler-arguments-1.png b/docs/img/eclipse-java-compiler-arguments-1.png
deleted file mode 100644
index 4902ab0a..00000000
Binary files a/docs/img/eclipse-java-compiler-arguments-1.png and /dev/null differ
diff --git a/docs/img/eclipse-java-compiler-arguments-2.png b/docs/img/eclipse-java-compiler-arguments-2.png
deleted file mode 100644
index 0ba1798a..00000000
Binary files a/docs/img/eclipse-java-compiler-arguments-2.png and /dev/null differ
diff --git a/docs/img/eclipse-project-structure.png b/docs/img/eclipse-project-structure.png
deleted file mode 100644
index 9ed08cac..00000000
Binary files a/docs/img/eclipse-project-structure.png and /dev/null differ
diff --git a/docs/img/intellij-java-compiler-arguments.png b/docs/img/intellij-java-compiler-arguments.png
deleted file mode 100644
index d06ea287..00000000
Binary files a/docs/img/intellij-java-compiler-arguments.png and /dev/null differ
diff --git a/docs/img/intellij-project-structure.png b/docs/img/intellij-project-structure.png
deleted file mode 100644
index e7f5c322..00000000
Binary files a/docs/img/intellij-project-structure.png and /dev/null differ
diff --git a/docs/img/mr-jar-manifest.png b/docs/img/mr-jar-manifest.png
deleted file mode 100644
index b1d955aa..00000000
Binary files a/docs/img/mr-jar-manifest.png and /dev/null differ
diff --git a/docs/img/mr-jar-sources.png b/docs/img/mr-jar-sources.png
deleted file mode 100644
index dc341b94..00000000
Binary files a/docs/img/mr-jar-sources.png and /dev/null differ
diff --git a/docs/intellij.md b/docs/intellij.md
deleted file mode 100644
index 47e9654e..00000000
--- a/docs/intellij.md
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-# IntelliJ IDE Setup
-
-The use of Maven submodules to build a Multi Release JAR was motivated by its compatibility with
-popular IDEs.
-
-There are two configuration properties to be aware of when configuring your local development
-environment:
-
-1) Java compiler versions
-2) Compiler arguments for JPMS
-
-#### Java compiler versions
-
-Settings are usually synchronised with maven toolchain configuration, otherwise the Java version
-for a maven module should be set as follows:
-
-| Maven submodule | JDK |
-| -------------------------- | --- |
-| datasketches-memory | 8 |
-| datasketches-memory-java8 | 8 |
-| datasketches-memory-java11 | 11 |
-
-#### Compiler arguments for JPMS
-
-In order to compile Maven modules in Java versions 11 and above, it is necessary to provide the
-following arguments to the compiler. These are usually synchronised with the `pom.xml`
-configuration:
-
-```xml
- <compilerArgs>
- <arg>--add-exports</arg>
- <arg>java.base/jdk.internal.ref=org.apache.datasketches.memory</arg>
- </compilerArgs>
-```
-
----
-
-## Running Datasketches-Memory in IntelliJ-IDEA
-
-Note that the following configuration was verified using IntelliJ IDEA 2021.1.2
-(Community Edition).
-
-### Java compiler versions
-
-Ensure that the correct SDK is used for each module using the IntelliJ project structure dialog:
-
-
-
----
-
-### Compiler arguments for JPMS
-
-Ensure that the required JPMS arguments are set for the compiler (Java 11 only).
-These should be detected and set automatically based on the `pom.xml` configuration.
-
-
diff --git a/docs/maven-toolchains.md b/docs/maven-toolchains.md
deleted file mode 100644
index 703b2086..00000000
--- a/docs/maven-toolchains.md
+++ /dev/null
@@ -1,79 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-# Maven Toolchains Configuration
-
-From the [maven-toolchain-plugin documentation](https://maven.apache.org/plugins/maven-toolchains-plugin/usage.html):
-
-> A Toolchain is an object that Maven plugins can use to retrieve preconfigured tools
-> (including location and other information).
-> With the jdk toolchain, for example, instead of being stuck with the JDK used to run Maven,
-> all plugins can use the same or other JDK instances without hardcoding absolute paths
-> into the pom.xml and without configuring every plugin that require a path to JDK tools.
-
-
-### Motivation
-
-Toolchains are used in different maven modules to ensure that the correct Java compiler version
-is used when compiling source files. This is because Datasketches Memory uses some JDK
-version-specific APIs, which require different JDKs to compile correctly.
-
-### Toolchains template
-
-Your local environment requires toolchain entries for Java 8 and 11 to build this project.
-These can be found in a reference `toolchains.xml` template in the `tools` directory.
-Any maven commands used during development can be supplemented with:
-`--toolchains tools/toolchains.xml`, without permanently modifying the local
-`~/.m2/toolchains.xml` file.
-
-Alternatively, to avoid having to add this extra argument to every Maven command,
-the toolchain template can be copied to your local maven `toolchains.xml`,
-e.g. `~/.m2/toolchains.xml`. If there is already a locally configured `toolchains.xml` file,
-the requisite entries should be merged into the existing file if they do not already exist.
-
-### Environment variables
-
-In order to compile the project using Maven toolchains, the following environment variables should be set as follows:
-
-| Environment variable | Value |
-| --------------------------------- | ------------------------------------- |
-| JAVA8_HOME | Home directory for Java 8 (openJDK) |
-| JAVA11_HOME | Home directory for Java 11 (openJDK) |
-
-For example, if you are using [SDKMAN!](https://sdkman.io/), your environment
-might be configured as follows:
-
-- JAVA8_HOME: `/Users/me/.sdkman/candidates/java/8.0.282.hs-adpt`
-- JAVA11_HOME: `/Users/me/.sdkman/candidates/java/11.0.10.hs-adpt`
-
-#### For MacOS or Linux variants
-Users can discover what JDKs have been loaded into their environment by using the following
-command:
-
- /usr/libexec/java_home -V
-
-### Eclipse configuration
-
-If you are an Eclipse user, you may need further configuration for your IDE to use the
-appropriate JDK for each module - see the [Eclipse IDE Setup](eclipse.md).
-
-### IntelliJ configuration
-
-Similarly, if you are an IntelliJ user, you may need further configuration for your IDE to use the
-appropriate JDK for each module - see the [IntelliJ IDE Setup](intellij.md).
diff --git a/docs/module-system.md b/docs/module-system.md
deleted file mode 100644
index b5cf78a1..00000000
--- a/docs/module-system.md
+++ /dev/null
@@ -1,106 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-# Java Platform Module System (JPMS) For JDK 11+
-
-The [Java Platform Module System](https://openjdk.java.net/projects/jigsaw/spec/) defines a module
-system for the Java Platform. For more documentation on the implementation, see
-[JEP-261](https://openjdk.java.net/jeps/261).
-
-#### Reliable configuration
-
-> Reliable configuration, to replace the brittle, error-prone class-path mechanism with a means
-for program components
-> to declare explicit dependencies upon one another;
-
-This prevents ClassLoader errors such as `NoClassDefFoundError` that typically occur at runtime
-and make applications less reliable.
-
-#### Strong encapsulation
-
-> Strong encapsulation, to allow a component to declare which of its APIs are accessible by other
-components, and which are not;
-
-JDK internals are now strongly encapsulated, except for critical internal APIs such as
-`sun.misc.Unsafe` (see [JEP-396](https://openjdk.java.net/jeps/396) and
-[JEP-403](https://openjdk.java.net/jeps/403)).
-Datasketches Memory can no longer access these APIs by default, and requires explicit access.
-
-### Module declarations
-
-A module declaration is a java file (typically `module-info.java`) that explicitly defines a
-dependency graph.
-
-#### org.apache.datasketches.memory
-
-In the `datasketches-memory-java11` maven submodule source root, the following module declaration has
-been added:
-
-```java
-module org.apache.datasketches.memory {
- requires java.base;
- requires java.logging;
- requires jdk.unsupported;
-
- exports org.apache.datasketches.memory;
-}
-```
-
-This declaration explicitly defines the dependencies for the `org.apache.datasketches.memory` module, as well as the
-external API. The `org.apache.datasketches.memory.internal` package is now inaccessible to the end user,
-providing better encapsulation.
-
-### Compiler arguments
-
-Some dependencies are encapsulated by default, and this causes compilation to fail for
-Java versions 11 and above.
-These dependencies can be made accessible at compile time through the use of the
-`add-exports` compiler argument.
-This argument allows one module to access some un-exported types of another module.
-Datasketches Memory depends on several internal APIs and therefore requires special
-exposition.
-
-For example, in order to compile the `datasketches-memory-java11` submodule, the following compiler
-arguments are added to the Maven compiler plugin in the module's pom.xml file:
-
-```xml
- <compilerArgs>
- <arg>--add-exports</arg>
- <arg>java.base/jdk.internal.ref=org.apache.datasketches.memory</arg>
- </compilerArgs>
-```
-
-### Runtime arguments (only when allocating off-heap memory)
-
-When allocating off-heap memory using `WritableMemory.allocateDirect(...)`,
-reflection is used by the Datasketches Memory component to access JVM internal class
-fields and methods that do not have `public` visibility. For JDK 11+, the JPMS
-requires that the user add additional JVM run-time arguments (`add-opens...`, which permit this reflection.
-
-Note that if the user has allocated off-heap memory using ByteBuffer.allocateDirect(...),
-the DataSketches memory component can still read and write to this memory without these `add-opens...` arguments.
-
-See the use **Use as a Library** and **Developer Usage** sections in the main [README](../README.md) for more details. In addition, examples are provided in the [usage examples](usage-examples.md) document.
-
-### JPMS and Java 8
-
-Java 8 does not support module declarations and the JPMS module system, and no additional
-runtime arguments are necessary.
-However, support is retained for Java 8 users by only including the compiled declaration
-(`module-info.class`) in the `datasketches-memory` multi-release JAR for Java11 and above.
diff --git a/docs/multi-release-jar.md b/docs/multi-release-jar.md
deleted file mode 100644
index 532bc6f0..00000000
--- a/docs/multi-release-jar.md
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-# Multi-Release JAR
-
-The `datasketches-memory` module assembles a multi-release (MR) JAR for release that consists of
-multiple Java-release-specific versions of compiled class files.
-
-From [JEP-238](https://openjdk.java.net/jeps/238):
-
-> Third party libraries and frameworks typically support a range of Java platform versions,
-generally going several versions back. As a consequence they often do not take advantage of
-language or API features available in newer releases since it is difficult to express conditional
-platform dependencies, which generally involves reflection, or to distribute different library
-artifacts for different platform versions.
-
-The next case describes the challenge in supporting newer versions of Java for libraries
-such as DataSketches Memory:
-
-> Some libraries and frameworks, furthermore, use internal APIs of the JDK that will be made
-inaccessible in Java 9 when module boundaries are strictly enforced. This also creates a
-disincentive to support new platform versions when there are public, supported API
-replacements for such internal APIs.
-
-### Assembly
-
-During the Maven package phase, the [Maven exec plugin](https://www.mojohaus.org/exec-maven-plugin/index.html)
-invokes a custom bash script `package-mr-jar.sh` located in the `tools/scripts` directory.
-This script requires that the prior phases in the Maven lifecycle have been completed.
-
-The following maven submodules are used to source the compiled class files for the MR-JAR:
-
-
-
-### Manifest
-
-The Maven assembly plugin copies version specific class files into JAR manifest META-INF
-directory, as shown in the diagram below:
-
-
diff --git a/docs/usage-examples.md b/docs/usage-examples.md
deleted file mode 100644
index 948c0339..00000000
--- a/docs/usage-examples.md
+++ /dev/null
@@ -1,204 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-# Usage Examples
-
-You may need to supply additional runtime arguments to the JVM depending on how you are using the Datasketches Memory library.
-For more information regarding required JPMS arguments and when they are applicable, see the [README](../README.md).
-This document provides examples for the following scenarios:
-
-1. Using the library from a Java 8 application
-2. Using the library with on-heap memory only
-3. Using off-heap memory in a non-modularized Java 11+ application
-4. Using off-heap memory in a modularized Java 11+ application
-
-### 1) Using the library from a Java 8 application
-
-No additional runtime arguments are required.
-
-As an example, consider the following launch script that compiles and runs a simple Java 8 application:
-
-```shell
- JH=$JAVA8_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-jdk8
-
- cd $patha
- echo PWD:$(pwd)
- echo $JAVA_HOME
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp libs/*\
- $(find . -name '*.java')
-
- echo "---- RUN ----"
-
- $JAVA\
- -cp libs/*:target/test-classes:src/test/resources/\
- org.xyz.memory.RunMain
-```
-
-### 2) Using the library with on-heap memory only
-
-Similarly, no additional runtime arguments are required in this scenario - regardless of whether the library is used from a Java 8 or Java 11+ application.
-
-As an example, consider the following launch script that compiles and runs a simple Java 11 application that only exclusively
-uses on-heap memory:
-
-```shell
- JH=$JAVA11_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-nomod-heap-jdk11
-
- cd $patha
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp "mods/*":"libs/*"
- -p mods
- $(find . -name '*.java')
-
- echo "---- RUN ----"
-
- $JAVA\
- -cp target/test-classes:"mods/*":"libs/*":src/test/resources\
- org.xyz.memory.RunMain
-```
-
-### 3) Using off-heap memory in a non-modularized Java 11+ application
-
-The following section applies to applications that are not modularized JPMS applications.
-
-In order to allocate off-heap memory using the `WritableMemory.allocateDirect(...)` method in Java 11 and above, you must provide the
-following runtime arguments to the JVM:
-
-```shell
- --add-exports java.base/jdk.internal.misc=ALL-UNNAMED\
- --add-exports java.base/jdk.internal.ref=ALL-UNNAMED\
- --add-opens java.base/java.nio=ALL-UNNAMED\
- --add-opens java.base/sun.nio.ch=ALL-UNNAMED\
-```
-
-These arguments expose encapsulated packages in the `java.base` package to the `org.apache.datasketches.memory` module,
-which runs as an UNNAMED module in a non-JPMS (non-modularized) application.
-
-The following launch script compiles and runs a non-modularized Java 11 application:
-
-```shell
- JH=$JAVA11_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-nomod-jdk11
-
- cd $patha
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp "mods/*":"libs/*"
- -p mods
- $(find . -name '*.java')
-
- echo "---- RUN ----"
-
- $JAVA\
- --add-exports java.base/jdk.internal.misc=ALL-UNNAMED\
- --add-exports java.base/jdk.internal.ref=ALL-UNNAMED\
- --add-opens java.base/java.nio=ALL-UNNAMED\
- --add-opens java.base/sun.nio.ch=ALL-UNNAMED\
- -cp target/test-classes:"mods/*":"libs/*":src/test/resources\
- org.xyz.memory.RunMain
-```
-where the traditional classpath (`-cp`) argument contains all modules, libraries and resources.
-
-Note: `mods` is a local directory containing external modules, and `libs` is a local directory for external library
-dependencies. No distinction is made between modules and libraries since they are both appended to the classpath.
-
-### 4) Using off-heap memory in a modularized Java 11+ application
-
-The following section applies to modularized JPMS applications.
-
-In order to allocate off-heap memory using the `WritableMemory.allocateDirect(...)` method in Java 11 and above, you must provide the
-following runtime arguments to the JVM:
-
-```shell
- --add-exports java.base/jdk.internal.misc=org.apache.datasketches.memory\
- --add-exports java.base/jdk.internal.ref=org.apache.datasketches.memory\
- --add-opens java.base/java.nio=org.apache.datasketches.memory\
- --add-opens java.base/sun.nio.ch=org.apache.datasketches.memory\
-```
-
-These arguments expose encapsulated packages in the `java.base` package to the `org.apache.datasketches.memory` module.
-
-The following launch script compiles and runs a modularized Java 11 application:
-
-```shell
- JH=$JAVA11_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-mod-jdk11
-
- cd $patha
- echo PWD:$(pwd)
- echo $JAVA_HOME
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp "mods/*":"libs/*"
- -p mods
- $(find . -name '*.java')
-
- echo "---- RUN ----"
- echo PWD:$(pwd)
-
- $JAVA\
- --add-opens java.base/java.nio=org.apache.datasketches.memory\
- --add-opens java.base/sun.nio.ch=org.apache.datasketches.memory\
- -cp "/libs/*":src/test/resources\
- -p target/test-classes:mods\
- -m org.xyz.memory/org.xyz.memory.RunMain
-```
-where the traditional classpath (`-cp`) argument contains libraries and resources, and the module-path argument (`-p`)
-references all external modules and compiled classes for the current user application, which is itself a module.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org