1
1
---
2
- # Copyright (c) 2017, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ # Copyright (c) 2017, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
#
5
5
# This code is free software; you can redistribute it and/or modify it
@@ -179,7 +179,11 @@ e.g. "2022-02-12T12:30:00-05:00".
179
179
` --hash-modules ` .
180
180
181
181
` --target-platform ` * platform*
182
- : Specifies the target platform.
182
+ : Specifies the target platform of a JMOD file intended for a specific
183
+ operating system and architecture. The value should follow
184
+ the format ` <os>-<arch> ` , where ` <os> ` is the operating system
185
+ and ` <arch> ` is the hardware architecture. Example values include
186
+ ` linux-amd64 ` , ` windows-amd64 ` , and ` macos-aarch64 ` .
183
187
184
188
` --version `
185
189
: Prints version information of the ` jmod ` tool.
@@ -190,7 +194,7 @@ e.g. "2022-02-12T12:30:00-05:00".
190
194
An options file is a text file that contains the options and values that
191
195
you would ordinarily enter in a command prompt. Options may appear on one
192
196
line or on several lines. You may not specify environment variables for
193
- path names. You may comment out lines by prefixinga hash symbol (`#`) to
197
+ path names. You may comment out lines by prefixing a hash symbol (`#`) to
194
198
the beginning of the line.
195
199
196
200
The following is an example of an options file for the `jmod` command:
@@ -201,8 +205,7 @@ e.g. "2022-02-12T12:30:00-05:00".
201
205
--cmds commands --config configfiles --header-files src/h
202
206
--libs lib --main-class com.greetings.Main
203
207
--man-pages man --module-version 1.0
204
- --os-arch "x86_x64" --os-name "macOS"
205
- --os-version "10.10.5" greetingsmod
208
+ --target-platform "macos-aarch64" greetingsmod
206
209
```
207
210
208
211
## Extra Options for jmod
@@ -217,23 +220,32 @@ extra options that can be used with the command.
217
220
: Hint for a tool to issue a warning if the module is resolved. One of
218
221
deprecated, deprecated-for-removal, or incubating.
219
222
220
- ## jmod Create Example
223
+ ## jmod Create Examples
221
224
222
- The following is an example of creating a JMOD file :
225
+ Create a JMOD file containing only compiled classes :
223
226
224
227
```
225
- jmod create --class-path mods/com.greetings --cmds commands
226
- --config configfiles --header-files src/h --libs lib
227
- --main-class com.greetings.Main --man-pages man --module-version 1.0
228
- --os-arch "x86_x64" --os-name "macOS"
229
- --os-version "10.10.5" greetingsmod
228
+ jmod create --class-path build/foo/classes jmods/foo1.jmod
230
229
```
230
+
231
231
Create a JMOD file specifying the date for the entries as ` 2022 March 15 00:00:00 ` :
232
232
233
233
```
234
234
jmod create --class-path build/foo/classes --date 2022-03-15T00:00:00Z
235
- jmods/foo1.jmod
235
+ jmods/foo2.jmod
236
+ ```
237
+
238
+ Create a JMOD file bundling compiled classes, native commands, configuration files,
239
+ header files, native libraries, man pages, and metadata including the
240
+ main class, module version, and target platform details:
241
+
236
242
```
243
+ jmod create --class-path mods/com.greetings --cmds commands
244
+ --config configfiles --header-files src/h --libs lib
245
+ --man-pages man --main-class com.greetings.Main --module-version 1.0
246
+ --target-platform "macos-aarch64" greetingsmod
247
+ ```
248
+
237
249
## jmod Hash Example
238
250
239
251
The following example demonstrates what happens when you try to link a leaf
0 commit comments