Java bindings to the tree-sitter parsing library.
- Install JDK 22 and set
JAVA_HOMEto it - Download jextract and add it to your
PATH - Install the
tree-sitter&tree-sitter-javalibraries
git clone https://github.com/tree-sitter/java-tree-sitter
cd java-tree-sitter
git submodule update --init
mvn testThese alternatives support older JDK versions or Android:
- tree-sitter/kotlin-tree-sitter (JDK 17+, Android SDK 23+, Kotlin 1.9)
- bonede/tree-sitter-ng (JDK 8+)
- seart-group/java-tree-sitter (JDK 11+)