frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire.

License

License

Categories

Categories

Wire Data Data Structures
GroupId

GroupId

com.frostwire
ArtifactId

ArtifactId

jlibtorrent-android
Last Version

Last Version

1.1.0.9
Release Date

Release Date

Type

Type

pom
Description

Description

frostwire-jlibtorrent
A swig Java interface for libtorrent by the makers of FrostWire.
Project URL

Project URL

https://github.com/frostwire/frostwire-jlibtorrent
Source Code Management

Source Code Management

https://github.com/frostwire/frostwire-jlibtorrent

Download jlibtorrent-android

How to add to project

<!-- https://jarcasting.com/artifacts/com.frostwire/jlibtorrent-android/ -->
<dependency>
    <groupId>com.frostwire</groupId>
    <artifactId>jlibtorrent-android</artifactId>
    <version>1.1.0.9</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.frostwire/jlibtorrent-android/
implementation 'com.frostwire:jlibtorrent-android:1.1.0.9'
// https://jarcasting.com/artifacts/com.frostwire/jlibtorrent-android/
implementation ("com.frostwire:jlibtorrent-android:1.1.0.9")
'com.frostwire:jlibtorrent-android:pom:1.1.0.9'
<dependency org="com.frostwire" name="jlibtorrent-android" rev="1.1.0.9">
  <artifact name="jlibtorrent-android" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.frostwire', module='jlibtorrent-android', version='1.1.0.9')
)
libraryDependencies += "com.frostwire" % "jlibtorrent-android" % "1.1.0.9"
[com.frostwire/jlibtorrent-android "1.1.0.9"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

frostwire-jlibtorrent

JLibtorrent Logo

A swig Java interface for libtorrent by the makers of FrostWire.

Develop libtorrent based apps with the joy of coding in Java.

Discord Developer Chatroom Invite

Using

Download the latest release .jars

All platforms will need you to use at least 2 .jar files.

The .jar with the java classes -> jlibtorrent-w.x.y.z.jar and a secondary .jars containing the JNI binary library for the particular OS and CPU architecture.

In the case of desktop operating systems, you might want to extract the shared library inside the jar (.dll, .so, .dylib) and place it in a folder specified by the java.library.path

The secondary jars are:

  • Windows: jlibtorrent-windows-w.x.y.z.jar (x86 and x86_64 .dlls)
  • Mac: jlibtorrent-macosx-w.x.y.z.jar (x86_64 .dylib)
  • Linux: jlibtorrent-linux-w.x.y.z.jar (x86 and x86_64 .so)

In the case of Android, make sure to put the following 3 jars in your project's libs folder (see FrostWire for Android's as an example):

  • jlibtorrent-w.x.y.z.jar
  • jlibtorrent-android-arm-w.x.y.z.jar
  • jlibtorrent-android-arm64-w.x.y.z.jar
  • jlibtorrent-android-x86-w.x.y.z.jar
  • jlibtorrent-android-x86_64-w.x.y.z.jar

If you use ProGuard to obfuscate/minify make sure to add the following statement

-keep class com.frostwire.jlibtorrent.swig.libtorrent_jni {*;}

Note that there are multiple version of jlibtorrent for different platforms: jlibtorrent, jlibtorrent-windows, jlibtorrent-linux, jlibtorrent-macosx and jlibtorrent-android-<arch>. These are all different artifacts.

For examples look at https://github.com/frostwire/frostwire-jlibtorrent/tree/master/src/test/java/com/frostwire/jlibtorrent/demo

Architectures supported:

  • Android (armeabi-v7a, arm64-v8a, x86, x86_64)
  • Linux (x86_64)
  • Windows (x86_64)
  • Mac OS X (x86_64)

Building

To build the macos (x86_64) binaries you will need a mac computer, to build the mac library issue the following command:

cd swig && ./build-macos.sh

To build the windows (x86_64), linux (x86_64) and android binaries (arm, arm64, x86, x86_64) you will need a working version of Docker, then just issue the following command

cd swig && ./docker_build_binaries.sh

The resulting jars will be at:

  • ./build/libs/jlibtorrent-w.x.y.z.jar
  • ./build/libs/jlibtorrent-windows-w.x.y.z.jar
  • ./build/libs/jlibtorrent-macos-w.x.y.z.jar
  • ./build/libs/jlibtorrent-linux-w.x.y.z.jar
  • ./build/libs/jlibtorrent-android-arm-w.x.y.z.jar
  • ./build/libs/jlibtorrent-android-arm64-w.x.y.z.jar
  • ./build/libs/jlibtorrent-android-x86-w.x.y.z.jar
  • ./build/libs/jlibtorrent-android-x86_64-w.x.y.z.jar

If you need the singled out .so,.dylib and .dll files and their .debug versions they will be at:

  • ./swig/bin/release/windows/x86_64/jlibtorrent.dll
  • ./swig/bin/release/macosx/x86_64/libjlibtorrent.dylib
  • ./swig/bin/release/linux/x86_64/libjlibtorrent.so
  • ./swig/bin/release/android/armeabi-v7a/libjlibtorrent.so
  • ./swig/bin/release/android/arm64-v8a/libjlibtorrent.so
  • ./swig/bin/release/android/x86/libjlibtorrent.so
  • ./swig/bin/release/android/x86_64/libjlibtorrent.so

Projects using jLibtorrent

License

This software is offered under the MIT License, available here.

Versions

Version
1.1.0.9
1.1.0.8
1.1.0.7
1.1.0.6
1.1.0.5
1.1.0.4
1.1.0.3
1.1.0.2
1.1.0.1
1.1.0.0