JSword is a Java library for Bible study software, providing a rich API for accessing, searching, and displaying biblical texts and related resources. It is the engine behind a variety of Bible study applications, offering a flexible and extensible platform for developers and users alike.
JSword aims to make the Bible and related texts freely available in a wide range of languages and translations. It supports a variety of modern and ancient Bible versions, commentaries, dictionaries, daily devotionals, and other resources.
JSword powers several open-source projects, including BibleDesktop and And Bible. The library is designed for cross-platform use and can be integrated into both desktop and mobile applications.
- Read and Search Bible Texts: Access a wide variety of Bibles, commentaries, dictionaries, and books in many languages.
- Advanced Search: Flexible searching by keywords, phrases, or passages, supporting Boolean logic and regular expressions.
- Internationalization (i18n): Supports multiple languages for both interface and content, including community-provided translations.
- Modular Design: Easily extendable to support new resource types or front-end applications.
- Sword Module Support: Reads and manages SWORD Project modules created by CrossWire and others.
- Strong’s Number Support: Lookup and cross-reference original language words.
- Daily Devotionals: Built-in support for reading devotionals by date.
- Open Source: Freely available under the LGPL license.
- Java 8
- Gradle (for building from source)
git clone https://github.com/crosswire/jsword.git
cd jsword
./gradlew build
You can include JSword as a dependency via JitPack:
Gradle:
implementation 'com.github.crosswire:jsword:master-SNAPSHOT'
Or replace master-SNAPSHOT
with a tagged release version.
import org.crosswire.jsword.book.*;
import org.crosswire.jsword.passage.*;
import org.crosswire.jsword.versification.*;
Book bible = Books.installed().getBook("KJV");
Key key = bible.getKey("John 3:16");
BookData data = new BookData(bible, key);
String text = OSISUtil.getCanonicalText(data.getOsisFragment());
System.out.println(text);
JSword uses Gradle as its build tool. This makes it easy to open and build the project in all modern Java IDEs.
Follow the instructions below for your preferred environment:
- Open Eclipse.
- Select File > Import... > Gradle > Existing Gradle Project.
- Navigate to the JSword directory and follow the prompts.
- Eclipse will automatically configure the project using the
build.gradle
file.
- Open IntelliJ IDEA.
- Select File > Open... and choose the JSword project directory.
- IntelliJ will detect the
build.gradle
file and prompt you to import the Gradle project. - Accept the defaults and complete the import.
- Open Visual Studio Code.
- Install the Java Extension Pack (if not already installed).
- Use File > Open Folder... to open the JSword project directory.
- VS Code will recognize the Gradle build and provide Java project features.
Note:
There is no need to generate or commit IDE-specific files (such as .project
, .classpath
, .settings/
, .idea/
, or .vscode/
). All required project structure and dependencies are managed by Gradle.
For command-line builds, use:
./gradlew build
or on Windows:
gradlew.bat build
We welcome contributions! See our Contributing Guide for more information.
- Bug Reports & Feature Requests: Please use GitHub Issues or CrossWire Tracker.
- Pull Requests: Fork the repo, create a branch, and submit a PR.
JSword supports multiple languages for both interface and content. Community-provided translations—especially of Bible book names (BibleNames)—are maintained through Transifex.
We welcome contributions to our translations!
If you would like to help translate Bible book names or other strings:
- Visit our Transifex project page.
- Sign up or log in to Transifex.
- Request to join a language team or submit new translations.
Translations are integrated regularly to keep JSword multilingual.
JSword is released under the LGPL 2.1 or later License.
JSword is part of the CrossWire Bible Society family of open-source Bible software. Many thanks to all contributors and the wider community!
For more information, visit the JSword Project Page.