diff --git a/native-image-configure-examples/README.md b/archive/class-initialization-examples/README.md similarity index 73% rename from native-image-configure-examples/README.md rename to archive/class-initialization-examples/README.md index 585781552..e1203248a 100644 --- a/native-image-configure-examples/README.md +++ b/archive/class-initialization-examples/README.md @@ -20,28 +20,28 @@ In both examples we use the Jackson framework to parse a JSON file to determine 1. Download and install the latest GraalVM JDK using [SDKMAN!](https://sdkman.io/). ```bash - sdk install java 21.0.1-graal + sdk install java 21.0.5-graal ``` -2. Download or clone the repository and navigate into the `native-image-configure-examples` directory: +2. Download or clone the repository and navigate into the `class-initialization-examples` directory: ```bash git clone https://github.com/graalvm/graalvm-demos ``` ```bash - cd graalvm-demos/native-image-configure-examples + cd graalvm-demos/archive/class-initialization-examples ``` ## Build and Run Examples 1. Change to one of the demo subdirectories, for example, `configure-at-runtime-example`: ```bash - cd graalvm-demos/native-image-configure-examples/configure-at-runtime-example + cd configure-at-runtime-example ``` 2. Build the project: ```bash mvn package ``` -3. Once the Maven build succeeds, a native executable called "runtime-example" will be generated in the `configure-at-runtime-example/target/` directory. Run it: +3. Once the Maven build succeeds, a native executable called "runtime-example" will be generated in the _configure-at-runtime-example/target/_ directory. Run it: ```bash ./target/runtime-example ``` @@ -63,7 +63,4 @@ In both examples we use the Jackson framework to parse a JSON file to determine Loading application configuration at executable build time can speed up application startup. -### Related Documentation - -- [Build-Time Initialization](https://www.graalvm.org/latest/reference-manual/native-image/optimizations-and-performance/ClassInitialization/) -- [Initialize Once, Start Fast: Application Initialization at Build Time](http://www.christianwimmer.at/Publications/Wimmer19a/Wimmer19a.pdf) +Learn more about [Class Initialization in Native Image](https://www.graalvm.org/latest/reference-manual/native-image/optimizations-and-performance/ClassInitialization/) at the website, and from the blog post [Understanding Class Initialization in GraalVM Native Image Generation](https://medium.com/graalvm/understanding-class-initialization-in-graalvm-native-image-generation-d765b7e4d6ed). \ No newline at end of file diff --git a/native-image-configure-examples/configure-at-buildtime-example/pom.xml b/archive/class-initialization-examples/configure-at-buildtime-example/pom.xml similarity index 95% rename from native-image-configure-examples/configure-at-buildtime-example/pom.xml rename to archive/class-initialization-examples/configure-at-buildtime-example/pom.xml index 452d1808a..fbf012560 100644 --- a/native-image-configure-examples/configure-at-buildtime-example/pom.xml +++ b/archive/class-initialization-examples/configure-at-buildtime-example/pom.xml @@ -10,7 +10,7 @@ UTF-8 - 0.10.2 + 0.10.4 2.16.0 @@ -83,9 +83,6 @@ false buildtime-example - - --no-fallback - diff --git a/native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Configuration.java b/archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Configuration.java similarity index 100% rename from native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Configuration.java rename to archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Configuration.java diff --git a/native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/ConfigureAtBuildTime.java b/archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/ConfigureAtBuildTime.java similarity index 100% rename from native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/ConfigureAtBuildTime.java rename to archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/ConfigureAtBuildTime.java diff --git a/native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/CurrentTimeHandler.java b/archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/CurrentTimeHandler.java similarity index 100% rename from native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/CurrentTimeHandler.java rename to archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/CurrentTimeHandler.java diff --git a/native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Handler.java b/archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Handler.java similarity index 100% rename from native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Handler.java rename to archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/Handler.java diff --git a/native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/HelloWorldHandler.java b/archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/HelloWorldHandler.java similarity index 100% rename from native-image-configure-examples/configure-at-buildtime-example/src/main/java/example/buildtime/HelloWorldHandler.java rename to archive/class-initialization-examples/configure-at-buildtime-example/src/main/java/example/buildtime/HelloWorldHandler.java diff --git a/native-image-configure-examples/configure-at-buildtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-buildtime-example/native-image.properties b/archive/class-initialization-examples/configure-at-buildtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-buildtime-example/native-image.properties similarity index 100% rename from native-image-configure-examples/configure-at-buildtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-buildtime-example/native-image.properties rename to archive/class-initialization-examples/configure-at-buildtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-buildtime-example/native-image.properties diff --git a/native-image-configure-examples/configure-at-buildtime-example/src/main/resources/example/buildtime/configuration.json b/archive/class-initialization-examples/configure-at-buildtime-example/src/main/resources/example/buildtime/configuration.json similarity index 100% rename from native-image-configure-examples/configure-at-buildtime-example/src/main/resources/example/buildtime/configuration.json rename to archive/class-initialization-examples/configure-at-buildtime-example/src/main/resources/example/buildtime/configuration.json diff --git a/native-image-configure-examples/configure-at-runtime-example/pom.xml b/archive/class-initialization-examples/configure-at-runtime-example/pom.xml similarity index 95% rename from native-image-configure-examples/configure-at-runtime-example/pom.xml rename to archive/class-initialization-examples/configure-at-runtime-example/pom.xml index e59909dd5..e472243b7 100644 --- a/native-image-configure-examples/configure-at-runtime-example/pom.xml +++ b/archive/class-initialization-examples/configure-at-runtime-example/pom.xml @@ -10,7 +10,7 @@ UTF-8 - 0.10.2 + 0.10.4 2.16.0 @@ -83,9 +83,6 @@ runtime-example - - --no-fallback - diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/Configuration.java b/archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/Configuration.java similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/Configuration.java rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/Configuration.java diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/ConfigureAtRunTime.java b/archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/ConfigureAtRunTime.java similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/ConfigureAtRunTime.java rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/ConfigureAtRunTime.java diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/CurrentTimeHandler.java b/archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/CurrentTimeHandler.java similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/CurrentTimeHandler.java rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/CurrentTimeHandler.java diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/Handler.java b/archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/Handler.java similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/Handler.java rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/Handler.java diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/HelloWorldHandler.java b/archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/HelloWorldHandler.java similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/java/example/runtime/HelloWorldHandler.java rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/java/example/runtime/HelloWorldHandler.java diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/jni-config.json b/archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/jni-config.json similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/jni-config.json rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/jni-config.json diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/native-image.properties b/archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/native-image.properties similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/native-image.properties rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/native-image.properties diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/proxy-config.json b/archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/proxy-config.json similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/proxy-config.json rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/proxy-config.json diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/reflect-config.json b/archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/reflect-config.json similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/reflect-config.json rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/reflect-config.json diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/resource-config.json b/archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/resource-config.json similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/resource-config.json rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/META-INF/native-image/org.graalvm.nativeimage/configure-at-runtime-example/resource-config.json diff --git a/native-image-configure-examples/configure-at-runtime-example/src/main/resources/example/runtime/configuration.json b/archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/example/runtime/configuration.json similarity index 100% rename from native-image-configure-examples/configure-at-runtime-example/src/main/resources/example/runtime/configuration.json rename to archive/class-initialization-examples/configure-at-runtime-example/src/main/resources/example/runtime/configuration.json