Skip to content

Commit 94e69ab

Browse files
committed
Update Java API repo to include building from source doc
These steps were't migrated to Academy, so we're including them here.
1 parent e83cd75 commit 94e69ab

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
## Quick Links
99

10-
- Installation: [https://docs.tiledb.com/developer/installation/building-from-source/java](https://docs.tiledb.com/developer/installation/building-from-source/java)
11-
- Full developer documentation for all APIs and integrations: [https://docs.tiledb.com/main/](https://docs.tiledb.com/main/)
10+
- Installation: [docs/building-from-source.md](docs/building-from-source.md)
11+
- Full developer documentation for all APIs and integrations: [https://cloud.tiledb.com/academy](https://cloud.tiledb.com/academy)
1212

1313
## Development Notes
1414

docs/building-from-source.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Building TileDB-Java from Source
2+
3+
## Dependencies
4+
5+
To build the JNI extension, you need to install the following:
6+
7+
* Cmake (>=3.3)
8+
* JDK (>=1.8)
9+
10+
## Build
11+
12+
To build the library with the native library bundled in run:
13+
14+
```bash
15+
./gradlew assemble
16+
```
17+
18+
This will create the TileDB JNI library `build/tiledb_jni/libtiledbjni.dylib`. This will also download and build the TileDB core library if it is not found installed in a global system path, and place it in `build/externals/install/lib/libtiledb.dylib`.
19+
20+
If you wish to build with a custom version of the TileDB core library, you can define the environment variable `TILEDB_HOME`, e.g.:
21+
22+
```bash
23+
env TILEDB_HOME=/path/to/TileDB/dist ./gradlew assemble
24+
```
25+
26+
Note that if you build with a custom native TileDB library, it will only be bundled into the jar if the native static library was produced.
27+
28+
### Properties
29+
30+
If TileDB is not globally installed in the system where the JNI library is being compiled, the TileDB core Library will be compiled. There are multiple properties which can be configured, including S3 and HDFS support.
31+
32+
See [gradle.properties](https://github.com/TileDB-Inc/TileDB-Java/blob/master/gradle.properties) for all properties which can be set for building.
33+
34+
The properties can be set via the `-P` option to `gradlew`:
35+
36+
```bash
37+
./gradlew -P TILEDB_S3=ON -P TILEDB_VERBOSE=ON assemble
38+
```
39+
40+
### Tests
41+
42+
To run the tests use:
43+
44+
```bash
45+
./gradlew test
46+
```
47+

0 commit comments

Comments
 (0)