https://github.com/tree-sitter/java-tree-sitter
Java bindings to the Tree-sitter parsing library
https://github.com/tree-sitter/java-tree-sitter
Last synced: 10 months ago
JSON representation
Java bindings to the Tree-sitter parsing library
- Host: GitHub
- URL: https://github.com/tree-sitter/java-tree-sitter
- Owner: tree-sitter
- License: mit
- Created: 2024-06-23T17:18:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-08T08:15:13.000Z (10 months ago)
- Last Synced: 2025-03-10T20:09:31.748Z (10 months ago)
- Language: Java
- Homepage: https://tree-sitter.github.io/java-tree-sitter/
- Size: 114 KB
- Stars: 49
- Watchers: 5
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Tree-sitter
[![CI][ci]](https://github.com/tree-sitter/java-tree-sitter/actions/workflows/ci.yml)
[![central][central]](https://central.sonatype.com/artifact/io.github.tree-sitter/jtreesitter)
[![docs][docs]](https://tree-sitter.github.io/java-tree-sitter/)
Java bindings to the [tree-sitter] parsing library.
## Building
- Install JDK 22 and set `JAVA_HOME` to it
- Download [jextract] and add it to your `PATH`
- Install the `tree-sitter` & `tree-sitter-java` libraries
```bash
git clone https://github.com/tree-sitter/java-tree-sitter
cd java-tree-sitter
git submodule update --init
mvn test
```
## Alternatives
These alternatives support older JDK versions or Android:
- [tree-sitter/kotlin-tree-sitter](https://github.com/tree-sitter/kotlin-tree-sitter) (JDK 17+, Android SDK 23+, Kotlin 1.9)
- [bonede/tree-sitter-ng](https://github.com/bonede/tree-sitter-ng) (JDK 8+)
- [seart-group/java-tree-sitter](https://github.com/seart-group/java-tree-sitter) (JDK 11+)
- [AndroidIDEOfficial/android-tree-sitter](https://github.com/AndroidIDEOfficial/android-tree-sitter) (Android SDK 21+)
[tree-sitter]: https://tree-sitter.github.io/tree-sitter/
[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/java-tree-sitter/ci.yml?logo=github&label=CI
[central]: https://img.shields.io/maven-central/v/io.github.tree-sitter/jtreesitter?logo=sonatype&label=Maven%20Central
[docs]: https://img.shields.io/github/deployments/tree-sitter/java-tree-sitter/github-pages?logo=githubpages&label=API%20Docs
[FFM]: https://docs.oracle.com/en/java/javase/22/core/foreign-function-and-memory-api.html
[jextract]: https://jdk.java.net/jextract/