Are there any decent BitTorrent libraries for Java? I need to program a simple torrent client, but it would be great if I didn't have to write everything from scratch.
7 Answers
-
3[Etsy uses ttorrent](http://codeascraft.com/2012/01/23/solr-bittorrent-index-replication/) for Solr index replication. – Ryan May 29 '13 at 21:36
-
1As of 2017 it's for the most part abandoned and unmaintained. For everyone interested in Java BitTorrent I'd suggest checking out Bt, a modern Java 8 BitTorrent library: https://github.com/atomashpolskiy/bt . It includes: PEX, magnet links, DHT, message stream encryption, extended protocol. As a bonus it has clear and concise API and JavaDoc and, being built with Guice DI, provides vast possibilities for extension/customization. – Andrei Tomashpolskiy Jul 26 '17 at 14:21
-
There are important nuances that need to know. Ttorrent - does not support DHT. BT library - supported, only Android 8+ – Master Mar 28 '20 at 19:23
Snark by Three Rings is a very lightweight bitorrent library that will give you basic torrent features.
Was originally written by Mark Wielaard. A github source can be found here https://github.com/akerigan/born-again-snark
I have created a Bitlet Fork on Github.
It's LGPLed, and it's running faster than ttorent.

- 9,819
- 6
- 41
- 48

- 3,301
- 1
- 24
- 32
-
1Looks like bitlet made it onto github themselves in the end https://github.com/bitletorg/bitlet – Tim Abell Jan 02 '15 at 21:51
Azureus is written in Java - is most likely not "simple" but quite likely "decent" :)

- 73,784
- 33
- 194
- 347
-
5But is it a library - does it offer APIs that you can easily use in your own programs? – Jonik Jun 03 '09 at 13:37
Adding to answer from jjnguy : The code seems to be at http://code.google.com/p/snark/ and not in the repo pointed to in the link you've provided.
I've not used it, but a Google search showed up YAIRCC. Describes itself as "A lightweight Java Bittorrent library and client".

- 388
- 3
- 9
Transdroid and Transdroid-desktop are libraries for adroid, that can also be used in java to control existing torrent clients.

- 2,636
- 6
- 36
- 54