Skip to content

crosswire/jsword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSword - Free Bible Study Software

Build Status JitPack

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.


Overview

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.


Features

  • 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.

Getting Started

Requirements

  • Java 8
  • Gradle (for building from source)

Building from Source

git clone https://github.com/crosswire/jsword.git
cd jsword
./gradlew build

Using JSword in Your Project

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.


Documentation


Example Usage

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);

Opening JSword in Popular IDEs

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:

Eclipse

  1. Open Eclipse.
  2. Select File > Import... > Gradle > Existing Gradle Project.
  3. Navigate to the JSword directory and follow the prompts.
  4. Eclipse will automatically configure the project using the build.gradle file.

IntelliJ IDEA

  1. Open IntelliJ IDEA.
  2. Select File > Open... and choose the JSword project directory.
  3. IntelliJ will detect the build.gradle file and prompt you to import the Gradle project.
  4. Accept the defaults and complete the import.

Visual Studio Code

  1. Open Visual Studio Code.
  2. Install the Java Extension Pack (if not already installed).
  3. Use File > Open Folder... to open the JSword project directory.
  4. 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

Contributing

We welcome contributions! See our Contributing Guide for more information.

Internationalization (i18n) and Translations

JSword supports multiple languages for both interface and content. Community-provided translations—especially of Bible book names (BibleNames)—are maintained through Transifex.

Contribute a Translation

We welcome contributions to our translations!
If you would like to help translate Bible book names or other strings:

  1. Visit our Transifex project page.
  2. Sign up or log in to Transifex.
  3. Request to join a language team or submit new translations.

Translations are integrated regularly to keep JSword multilingual.


Community & Support


License

JSword is released under the LGPL 2.1 or later License.


Acknowledgments

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.

Packages

No packages published

Contributors 16

Languages