diff --git a/src/main/java/io/github/treesitter/jtreesitter/Language.java b/src/main/java/io/github/treesitter/jtreesitter/Language.java index 47324d7..98ab102 100644 --- a/src/main/java/io/github/treesitter/jtreesitter/Language.java +++ b/src/main/java/io/github/treesitter/jtreesitter/Language.java @@ -60,12 +60,9 @@ private static UnsatisfiedLinkError unresolved(String name) { *

Example

* *

{@snippet lang="java" : - * Language language; - * try (Arena arena = Arena.ofConfined()) { - * String library = System.mapLibraryName("tree-sitter-java"); - * SymbolLookup symbols = SymbolLookup.libraryLookup(library, arena); - * language = Language.load(symbols, "tree_sitter_java"); - * } + * String library = System.mapLibraryName("tree-sitter-java"); + * SymbolLookup symbols = SymbolLookup.libraryLookup(library, Arena.ofAuto()); + * Language language = Language.load(symbols, "tree_sitter_java"); * } * * @throws RuntimeException If the language could not be loaded. diff --git a/src/main/java/io/github/treesitter/jtreesitter/package-info.java b/src/main/java/io/github/treesitter/jtreesitter/package-info.java index a43b4b0..7f4f58b 100644 --- a/src/main/java/io/github/treesitter/jtreesitter/package-info.java +++ b/src/main/java/io/github/treesitter/jtreesitter/package-info.java @@ -15,7 +15,10 @@ *

  • Shared libraries for languages
  • * * - * The shared libraries must be installed system-wide or in {@systemProperty java.library.path} + * The shared libraries must be installed in the OS-specific library path. + * For example on Unix the `libtree-sitter.so` might have to be on `LD_LIBRARY_PATH` + * and on Windows `tree-sitter.dll` has to be in the current working directory or `PATH` + * (see the documentation of your OS for details). * *

    Basic Usage

    *