Skip to content

Commit a1dc848

Browse files
tkrajacicktoso
andauthored
Add note about installing JDK (#394)
Co-authored-by: Konrad `ktoso` Malawski <konrad.malawski@project13.pl>
1 parent ebe04bb commit a1dc848

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@ The primary purpose of this repository is to create an environment for collabora
1919

2020
This project consists of different modules which have different Swift and Java runtime requirements.
2121

22+
On macOS for example, you can install the JDK with [homebrew](https://brew.sh) using
23+
24+
```bash
25+
$ brew install openjdk
26+
# and create a symlink into /Library/Java/JavaVirtualMachines
27+
$ sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
28+
29+
# or if you have a distribution as cask it will be installed into /Library/Java/JavaVirtualMachines
30+
$ brew install --cask corretto
31+
```
32+
33+
or you can use a JDK manager like [sdkman](https://sdkman.io/install/) and set your `JAVA_HOME` environment variable
34+
35+
```bash
36+
$ export JAVA_HOME="$(sdk home java current)"
37+
```
38+
2239
## SwiftJava macros
2340

2441
SwiftJava is a Swift library offering macros which simplify writing JNI code "by hand" but also calling Java code from Swift.

0 commit comments

Comments
 (0)