<commit_before>[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)

# Box Java SDK

The Box Java SDK for interacting with the
[Box Content API](https://developers.box.com/docs/).

## Latest Release
Latest release can be found [here](https://github.com/box/box-java-sdk/tree/v2.58.0).

## Getting Started
Getting Started Docs: https://developer.box.com/guides/tooling/sdks/java/
API Reference: https://developer.box.com/reference/

## Quickstart
The SDK can be obtained by adding it as a [maven dependency](http://opensource.box.com/box-java-sdk/),
cloning the source into your project, or by downloading one of the precompiled JARs from the
[releases page on GitHub](https://github.com/box/box-java-sdk/releases).

**IF YOU USE THE JAR, you'll also need to include several dependencies:**

1. [minimal-json v0.9.5](https://github.com/ralfstx/minimal-json)
   Maven: `com.eclipsesource.minimal-json:minimal-json:0.9.5`
2. [jose4j v0.7.9](https://bitbucket.org/b_c/jose4j/wiki/Home)
   Maven: `org.bitbucket.b_c:jose4j:0.7.9`
3. [bouncycastle bcprov-jdk15on v1.60](http://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on)
   Maven: `org.bouncycastle:bcprov-jdk15on:1.60`
4. [bouncycastle bcpkix-jdk15on v1.60](http://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk15on)
   Maven: `org.bouncycastle:bcpkix-jdk15on:1.60`
5. [Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7](http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html)
   If you don't install this, you'll get an exception about key length or exception about parsing PKCS private key for Box Developer Edition. This is not a Box thing, this is a U.S. Government requirement concerning strong encryption.
   The listed jar is for Oracle JRE. There might be other similar JARs for different JRE versions like the one below for IBM JDK
   [Java Cryptography Extension for IBM JDK](https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=jcesdk)

An app has to be authorized by the admin of the enterprise before these tests. It's always good to begin with the
[Getting Started Section](https://developer.box.com/docs/setting-up-a-jwt-app) at Box's developer website

## Quick Test

**Following things work only if the app has been configured and authorized as mentioned [here](https://developer.box.com/docs/setting-up-a-jwt-app)**

Here is a simple example of how to authenticate with the API using a developer
token and then print the ID and name of each item in your root folder.

```java
BoxAPIConnection api = new BoxAPIConnection("developer-token");
BoxFolder rootFolder = BoxFolder.getRootFolder(api);<commit_msg>docs: Fixed links to `bouncycastle` libraries in the README.md<commit_after>[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)

# Box Java SDK

The Box Java SDK for interacting with the
[Box Content API](https://developers.box.com/docs/).

## Latest Release
Latest release can be found [here](https://github.com/box/box-java-sdk/tree/v2.58.0).

## Getting Started
Getting Started Docs: https://developer.box.com/guides/tooling/sdks/java/
API Reference: https://developer.box.com/reference/

## Quickstart
The SDK can be obtained by adding it as a [maven dependency](http://opensource.box.com/box-java-sdk/),
cloning the source into your project, or by downloading one of the precompiled JARs from the
[releases page on GitHub](https://github.com/box/box-java-sdk/releases).

**IF YOU USE THE JAR, you'll also need to include several dependencies:**

1. [minimal-json v0.9.5](https://github.com/ralfstx/minimal-json)
   Maven: `com.eclipsesource.minimal-json:minimal-json:0.9.5`
2. [jose4j v0.7.9](https://bitbucket.org/b_c/jose4j/wiki/Home)
   Maven: `org.bitbucket.b_c:jose4j:0.7.9`
3. [bouncycastle bcprov-jdk15on v1.57](https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on/1.57)
   Maven: `org.bouncycastle:bcprov-jdk15on:1.57`
4. [bouncycastle bcpkix-jdk15on v1.57](https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on/1.57)
   Maven: `org.bouncycastle:bcpkix-jdk15on:1.57`
5. [Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7](http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html)
   If you don't install this, you'll get an exception about key length or exception about parsing PKCS private key for Box Developer Edition. This is not a Box thing, this is a U.S. Government requirement concerning strong encryption.
   The listed jar is for Oracle JRE. There might be other similar JARs for different JRE versions like the one below for IBM JDK
   [Java Cryptography Extension for IBM JDK](https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=jcesdk)

An app has to be authorized by the admin of the enterprise before these tests. It's always good to begin with the
[Getting Started Section](https://developer.box.com/docs/setting-up-a-jwt-app) at Box's developer website

## Quick Test

**Following things work only if the app has been configured and authorized as mentioned [here](https://developer.box.com/docs/setting-up-a-jwt-app)**

Here is a simple example of how to authenticate with the API using a developer
token and then print the ID and name of each item in your root folder.

```java
BoxAPIConnection api = new BoxAPIConnection("developer-token");
BoxFolder rootFolder = BoxFolder.getRootFolder(api);
{'fraction_non_alphanumeric': 0.11721745481102794, 'fraction_numerical': 0.02227496804820157, 'mean_word_length': 4.670807453416149, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 22, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4241635', 'n_tokens_mistral': 1901, 'n_tokens_neox': 1773, 'n_words': 533}