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
Adding tasks for creating executable jar's for the examples.
The gradle task `buildExamples` will output fat jar's for each of the examples, which can be later run with
```
java -jar <Example>.jar
```
For running the examples, there are two approaches. Either you run the gradle example task with the syntax `gradle <example> --args="<arguments>"` or you can build fat JARs the examples through the task `gradle buildExamples`.
8
+
9
+
While both are valid, in this document we'll follow the second approach; when running `gradle buildExamples`, all the JARs will be located under `/examples/build/libs`, which can later be executed
10
+
11
+
```bash
12
+
java -jar <Example>.jar <arguments>
13
+
```
14
+
15
+
for instance
16
+
7
17
```bash
8
-
./gradle <example>
18
+
java -jar ZPub.jar -h
9
19
```
10
20
11
-
:warning: Passing arguments to these examples has not been enabled yet for this first version. Altering the Zenoh
12
-
configuration for these examples must be done programmatically. :warning:
There is the possibility to provide a Zenoh config file as follows
57
+
58
+
```bash
59
+
java -jar ZPub.jar -c path/to/config.json5
60
+
```
61
+
62
+
In that case, any other provided configuration parameters through the command line interface will not be taken into consideration.
63
+
64
+
One last comment regarding Zenoh logging for the examples, logs from the native library can be enabled through the environment variable `RUST_LOG` as follows:
65
+
66
+
```bash
67
+
RUST_LOG=<level> java -jar ZPub.jar
68
+
```
69
+
70
+
where `<level>` is the log filter (for instance `debug`, `warn`, `error`... (see the [Rust documentation](https://docs.rs/env_logger/latest/env_logger/#enabling-logging))).
13
71
14
72
----
15
73
@@ -23,7 +81,13 @@ The path/value will be received by all matching subscribers, for instance the [Z
0 commit comments