Skip to content

Commit

Permalink
Small doc reordering to make configuration clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
chase-ok committed Jul 6, 2023
1 parent 6f6ae04 commit 6e49861
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions book/src/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ You'll need to have a modern JDK installed. We recommend JDK17 or higher. Any JD
* Download [Amazon Coretto](https://aws.amazon.com/corretto/?filtered-posts.sort-by=item.additionalFields.createdDate&filtered-posts.sort-order=desc)
* Download a [pre-built openjdk package](https://openjdk.org/install/) suitable for your operating system

**You'll need the `javap` tool from the JDK to build with Duchess.** If the `JAVA_HOME` environment variable is set, Duchess will use it to locate `javap`. Otherwise, it will search for it on your `PATH`. Duchess relies on `javap` to reflect Java type information at build time. It will *not* be invoked at runtime.
**You'll need the `javap` tool from the JDK to build with Duchess.** You'll want to configure the `JAVA_HOME` environment variable to point to your JDK installation. Duchess will use it to locate `javap`. Otherwise, Duchess will search for it on your `PATH`. You can configure the environment variables used at build time via Cargo by creating a `.cargo/config.toml` file (see [this example from duchess itself](https://github.com/duchess-rs/duchess/blob/main/.cargo/config.toml)).

Duchess relies on `javap` to reflect Java type information at build time. It will *not* be invoked at runtime.

## Configuring the CLASSPATH

You will likely want to configure the CLASSPATH for your Rust project as well. You can do that via Cargo by creating a `.cargo/config.toml` file (see [this example from duchess itself](https://github.com/duchess-rs/duchess/blob/main/.cargo/config.toml)).
You will likely want to configure the `CLASSPATH` for your Rust project as well. Like with `JAVA_HOME`, you can do that via Cargo by creating a `.cargo/config.toml` file.

If your Rust project uses external JAR files, you may want to configure it to download them as part of the build. The [viper test crate](https://github.com/duchess-rs/duchess/tree/main/test-crates/viper) gives an example of how to do that. It uses a [build.rs](https://github.com/duchess-rs/duchess/blob/main/test-crates/viper/build.rs) file.

Expand Down

0 comments on commit 6e49861

Please sign in to comment.