Skip to content

Commit 2aaebcd

Browse files
committed
Fix readme.md
JAVA-5637
1 parent 511a63a commit 2aaebcd

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

graalvm-native-image-app/readme.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ you need to inform Gradle about that location as specified in https://docs.gradl
4747
Assuming that your MongoDB deployment is accessible at `mongodb://localhost:27017`,
4848
run from the driver project root directory:
4949

50-
| # | Command | Description |
51-
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
52-
| 0 | `env JAVA_HOME="${JDK17}" ./gradlew -PjavaVersion=21 :graalvm-native-image-app:nativeCompile` | Build the application relying on the reachability metadata stored in `graalvm-native-image-app/src/main/resources/META-INF/native-image`. |
53-
| 1 | `env JAVA_HOME="${JDK17}" ./gradlew clean && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew -PjavaVersion=21 -Pagent :graalvm-native-image-app:run && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew :graalvm-native-image-app:metadataCopy` | Collect the reachability metadata and update the files storing it. Do this before building the application only if building fails otherwise. |
54-
| 2 | `./graalvm-native-image-app/build/native/nativeCompile/NativeImageApp` | Run the application that has been built. |
55-
| 3 | `env JAVA_HOME="${JDK17}" ./gradlew -PjavaVersion=21 :graalvm-native-image-app:nativeRun` | Run the application using Gradle, build it if necessary relying on the stored reachability metadata. |
50+
| # | Command | Description |
51+
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
52+
| 0 | `env JAVA_HOME="${JDK17}" ./gradlew -PincludeGraalvm -PjavaVersion=21 :graalvm-native-image-app:nativeCompile` | Build the application relying on the reachability metadata stored in `graalvm-native-image-app/src/main/resources/META-INF/native-image`. |
53+
| 1 | `env JAVA_HOME="${JDK17}" ./gradlew clean && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew -PincludeGraalvm -PjavaVersion=21 -Pagent :graalvm-native-image-app:run && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew -PincludeGraalvm :graalvm-native-image-app:metadataCopy` | Collect the reachability metadata and update the files storing it. Do this before building the application only if building fails otherwise. |
54+
| 2 | `./graalvm-native-image-app/build/native/nativeCompile/NativeImageApp` | Run the application that has been built. |
55+
| 3 | `env JAVA_HOME="${JDK17}" ./gradlew -PincludeGraalvm -PjavaVersion=21 :graalvm-native-image-app:nativeRun` | Run the application using Gradle, build it if necessary relying on the stored reachability metadata. |
5656

5757
#### Specifying a custom connection string
5858

@@ -62,12 +62,10 @@ you can specify the connection string used by the `:graalvm-native-image-app:run
6262
Gradle tasks, as well as by the built native application by passing the CLI argument
6363
`-Dorg.mongodb.test.uri="<your connection string>"` to `gradlew` or `NativeImageApp` respectively:
6464

65-
For gradle to include this project in the build you *must* include a project flag: `-PincludeGraalvm`
66-
6765
```bash
68-
./gradlew ... -PincludeGraalvm -Dorg.mongodb.test.uri="<your connection string>"
66+
./gradlew ... -Dorg.mongodb.test.uri="<your connection string>"
6967
```
7068

7169
```bash
72-
./graalvm-native-image-app/build/native/nativeCompile/NativeImageApp -PincludeGraalvm -Dorg.mongodb.test.uri="<your connection string>"
70+
./graalvm-native-image-app/build/native/nativeCompile/NativeImageApp -Dorg.mongodb.test.uri="<your connection string>"
7371
```

0 commit comments

Comments
 (0)