You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: added support for specifying native options (quarkusio#1494)
Added both `//NATIVE_OPTIONS` and `--native-option`.
Also enabled `//COMPILE_OPTIONS` for both Kotlin and Groovy sources.
Updated docs to prefer the newer tag and option names.
Fixesquarkusio#1493
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/running.adoc
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ to your script/class to see it.
26
26
27
27
Flight recorder is a feature of the Java VM that lets you gather diagnostic and profiling data about your script.
28
28
29
-
You can use `//JAVA_OPTIONS` to have full control over it; but for the easiest setup `jbang` lets you just run with `--jfr`, e.g.,
29
+
You can use `//RUNTIME_OPTIONS` to have full control over it; but for the easiest setup `jbang` lets you just run with `--jfr`, e.g.,
30
30
31
31
jbang --jfr myapp.java
32
32
@@ -37,18 +37,23 @@ Then you can use tools like `jvisualvm` or `jmc` to explore the data.
37
37
If you want to tweak the configuration you can pass flight recorder options, like `jbang --jfr=filename=\{basename}.jfr,maxage=24h` where `\{basename}` will be replaced
38
38
by the filename and then added `maxage=24h` to flight recording options.
39
39
40
-
If you want further control use `//JAVAC_OPTIONS -XX:StartFlightRecording=<your options>` instead.
40
+
If you want further control use `//COMPILE_OPTIONS -XX:StartFlightRecording=<your options>` instead.
41
41
42
-
== `java`and `javac` Options
42
+
== `java`, `javac` and `nativeimage` Options
43
43
44
-
If you want to tweak memory settings or enable preview features you can setup the necessary options using
45
-
`//JAVA_OPTIONS` and `//JAVAC_OPTIONS` as in the following example using Java 14 experimental `record` feature:
44
+
You can pass options directly from JBang to the compiler and runtime tools that it uses to build and run your code.
45
+
46
+
The following source tags are available for setting JVM (`java`) options, compiler options (`javac`, `kotlinc`, etc) and native image builders (`nativeimage`) respectively: `//RUNTIME_OPTIONS`, `//COMPILE_OPTIONS` and `//NATIVE_OPTIONS`.
47
+
48
+
You can also set the same options from the command line using: `--runtime-option`, `--compile-option` and `--native-option`.
49
+
50
+
As an example, if you want to enable preview features you can set up the necessary options as in the following example that uses Java 14 experimental `record` feature:
0 commit comments