Open-source project
frostwire/frostwire-jlibtorrent avatar
frostwire/frostwire-jlibtorrent

frostwire-jlibtorrent puts libtorrent behind a Java API

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.

516 stars146 forksC++MIT

At a glance

What is it?
frostwire/frostwire-jlibtorrent is the SWIG-generated Java interface to libtorrent, published to a Maven repository by the makers of FrostWire with prebuilt native binaries for Android, Windows, macOS and Linux. It saves you from writing JNI, and it ties your build to a repository FrostWire hosts.
Who is it for?
Adopt frostwire-jlibtorrent if you need libtorrent's behaviour from Java and would rather not maintain JNI and native builds yourself, since the project ships the generated wrappers plus per-platform native artifacts for desktop and four Android ABIs. Do not adopt it if you need a version of libtorrent that FrostWire has not built, if your build must resolve every dependency from Maven Central, or if you are writing a Rust, Go or C++ client where the binding is pointless.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 113 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A SWIG interface, which means the C++ API is the API

frostwire-jlibtorrent is described in one line as a swig Java interface for libtorrent by the makers of FrostWire, with the pitch being to develop libtorrent based apps with the joy of coding in Java.

The word SWIG is the important detail. SWIG takes a C or C++ header and generates the binding, so what you call from Java is a mechanical translation of the libtorrent API rather than a hand-designed Java abstraction. That has two consequences, one good and one to plan around.

The good consequence is coverage. There is no gap where a libtorrent feature exists but the binding does not expose it, because the binding is derived from the same headers. The trade-off is that the Java surface looks like libtorrent: session handles, peer ids, torrent status structs, listeners, and C++ naming conventions carried across as Java method names.

For an application team that already knows libtorrent, that is a shortcut worth taking. For a team that does not, the binding removes the C++ requirement but not the domain knowledge. You still have to understand magnet handling, peer wire protocols, DHT behaviour and the session alert queue; the binding does not explain any of it to you.

The repository layout confirms the generated-and-built nature of the project. Alongside `src/` and a `swig/` directory there is a `libtorrent` directory, a `build.gradle`, a `gradlew` wrapper, and a `changelog.txt`. There is also `Arch.java` and `Arch.class` at the top level, which is the kind of small piece of machinery that exists to pick the right native library for the platform it is running on, and a `skills/` directory that suggests the project ships guidance for coding agents as well.

The Maven repository, and the version mismatch inside the README

The project publishes its releases to a Maven repository hosted at `https://dl.frostwire.com/maven`, and the README says this was a long-awaited addition. Every build tool example in the README adds that repository with a content filter restricted to the `com.frostwire` group, so the repository can be declared without affecting resolution of anything else.

The Gradle Groovy example is representative of the shape of all four:

groovy
repositories {
    maven {
        url "https://dl.frostwire.com/maven"
        content {
            includeGroup "com.frostwire"
        }
    }
}

The same dependency set is then shown for Gradle Kotlin, SBT and Maven, and the set of artifacts is the interesting part rather than the syntax. There is a plain `jlibtorrent` artifact that the comment describes as the Java class wrappers that all architectures need, and then a native artifact per platform: `jlibtorrent-android-arm`, `jlibtorrent-android-arm64`, `jlibtorrent-android-x86`, `jlibtorrent-android-x86_64`, `jlibtorrent-windows`, `jlibtorrent-macosx-x86_64`, `jlibtorrent-macosx-arm64`, `jlibtorrent-linux-x86_64` and `jlibtorrent-linux-arm64`.

One inconsistency is worth knowing before you copy an example. The Groovy example pins `2.0.12.9`, which is also the most recent listed release tag, while the Kotlin, SBT and Maven examples all pin `2.0.13.6`. The comments say to change the version for the latest, so the examples are not maintained in lockstep, and the one that matches a published release is not the one in the majority of the examples.

The practical rule is to pick a version string and verify it exists in the repository rather than trusting the snippet.

Why the Android artifacts are plural, and the 16 KB page size problem

The four Android artifacts are not redundant. The comment in the build files explains that Android projects need all of them to maximize chip compatibility, and that all architectures need the Java class wrapper jar as well.

That is a real constraint rather than a packaging quirk. Android native libraries are loaded per ABI, and a device that has an arm64 CPU can still run a 32-bit process on some configurations, so an Android application that wants to work across the device population ships several native binaries. Adding them all to the dependency list means the build pulls several shared objects, and the licensing and size consequences of that are yours to manage.

The repository also contains `ANDROID_16KB_PAGE_SIZE.md` and a `validate_android_16kb.sh` script, which together point at a specific modern Android problem: page sizes. Devices with 16 KB memory pages require native libraries to be aligned accordingly, and a library built only for 4 KB pages will fail to load on those devices. A validation script in the repository implies the maintainers check this property, and the accompanying document is where you would read how.

If you ship to Android, that document is the one file in this repository you should read before anything else. It is a deployment constraint on your app that arrives through this dependency, and it is the kind of thing that fails at install time on a device you do not own.

The repository also holds `bittorrent-v2-test.torrent`, a test fixture for BitTorrent v2, and a `build.gradle` alongside `deploy_jlibtorrent_maven_release.sh`, the script that publishes artifacts to the Maven repository.

The release process is documented as a checklist, not a promise

The top-level entries of this repository read like a project in the middle of organising itself, and that is informative for anyone deciding how much to trust the release process.

There is `CHANGE_VERSION_CHECKLIST.txt`, which describes how a version bump is supposed to be done. There is `deploy_jlibtorrent_maven_release.sh`, the script that publishes to the Maven repository. There is `BUILD_MANUAL.md`, a `DOCUMENTATION_HANDOFF.md` and a `MAVEN_STRUCTURE_EXAMPLE.md`, and also a `PLAN-cb6fe6b9c.md`, which is a plan document with a generated identifier in the filename. `FUNDING.yml` sits at the root, which is the standard file for Open Collective sponsorship metadata.

The last push was on 2026-07-02, roughly three months before the current date, and the repository is not archived. The three listed releases are `release/2.0.12.9` on 2026-05-14, `release/2.0.12.7` on 2025-10-23 and `release/2.0.12.5` on 2025-09-15. Note the branch naming, a `release/` prefix on the tag, which is unusual and means the tag and the branch names are not the same thing you would find on most Maven Central artifacts.

The version sequence also skips. 2.0.12.5, then 2.0.12.7, then 2.0.12.9, with no 2.0.12.6 or 2.0.12.8 in the list, and the examples in the README reference 2.0.13.6, which is above every listed release. So the released version numbers, the version the examples use, and the version the newest tag represents are three different points on the line, and the README examples are running ahead of the published tags.

For a dependency you intend to ship, the answer is to resolve the version from the repository itself rather than to reason about the numbering.

MIT licensed, one repository, and a real cost to switching away

The licence is MIT, which is the permissive end of the range and only asks that you keep the copyright notice and licence text in redistributions. That matters here for a specific reason: the native binaries are prebuilt and redistributed through a repository that FrostWire operates, so the terms of the binaries and of the binding are the terms of this project.

The dependency picture is the part to think about carefully. Your build resolves artifacts from a repository hosted by a single vendor, at `dl.frostwire.com`, and the native code inside those artifacts is libtorrent. If you later want to move to a different libtorrent binding, a different version, or a self-hosted native build, you are not swapping a library, you are replacing a chain that includes generated Java wrappers, per-platform native binaries, and a resolution path that is not Maven Central.

That is not a reason to avoid the project, because building libtorrent for nine platforms including four Android ABIs is real work that the project has already done. It is a reason to be clear that this is a dependency on FrostWire's release process, not just on a version of libtorrent.

The project also runs a Discord developer chatroom, and the presence of `skills/` in the repository root suggests the maintainers are starting to publish machine-readable guidance for coding agents working on the binding. That is a newer pattern in these ecosystems, and it is a signal of where the maintainers think assistant-written code will touch their work.

Editorial conclusion

Adopt frostwire-jlibtorrent if you need libtorrent's behaviour from Java and would rather not maintain JNI and native builds yourself, since the project ships the generated wrappers plus per-platform native artifacts for desktop and four Android ABIs. Do not adopt it if you need a version of libtorrent that FrostWire has not built, if your build must resolve every dependency from Maven Central, or if you are writing a Rust, Go or C++ client where the binding is pointless. Before you commit, pin the version you actually test, confirm the `com.frostwire` artifacts you need exist for your target platform, and read `ANDROID_16KB_PAGE_SIZE.md` if you ship to Android, because page size alignment is a separate problem from the binding itself.

Frequently asked questions

What is frostwire-jlibtorrent?

It is a SWIG Java interface for libtorrent, created by the makers of FrostWire, so that applications can use libtorrent from Java without writing JNI bindings by hand. The generated wrappers plus prebuilt native binaries are published as Maven artifacts under the `com.frostwire` group.

Where do I get the jlibtorrent Maven artifacts?

From the repository at `https://dl.frostwire.com/maven`, which the README says was created for the project's releases. Every example adds it with a content filter on the `com.frostwire` group so it does not affect other dependency resolution.

Which jlibtorrent artifacts do I need for my platform?

Every architecture needs the `jlibtorrent` artifact with the Java class wrappers, plus the native artifact for your target. Android projects need all four ABIs to maximize chip compatibility, and desktop builds need the matching `jlibtorrent-windows`, `jlibtorrent-macosx-x86_64`, `jlibtorrent-macosx-arm64`, `jlibtorrent-linux-x86_64` or `jlibtorrent-linux-arm64` artifact.

Which jlibtorrent version should I use?

The examples in the README are not consistent: the Groovy example pins 2.0.12.9, which is the most recent listed release tag, while the Kotlin, SBT and Maven examples pin 2.0.13.6, which is above every listed release. Each example says to change the version for the latest, so resolve the version from the repository rather than from the snippet.

Is there anything special about using jlibtorrent on Android?

Yes. The repository ships `ANDROID_16KB_PAGE_SIZE.md` and a `validate_android_16kb.sh` script, which cover the requirement that native libraries be aligned for devices with 16 KB memory pages, and the project publishes four Android ABI artifacts because a single binary does not cover every device.

Official sources

  1. frostwire/frostwire-jlibtorrent on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/frostwire-frostwire-jlibtorrent.svg)](https://hysenlabs.com/projects/frostwire-frostwire-jlibtorrent)

Was this useful?