title=API (JSR 354) date=2020-06-16 type=page status=published ~~~~~~

Money & Currency API

Download .zip Download .tar.gz View on GitHub

What is JSR 354?

JSR 354 provides a portable and extendible framework for handling of Money & Currency. The API models monetary amounts and currencies in a platform independent and portable way, including well defined extension points. It's API defines a simple yet flexible contract that enables users to choose the implementation matching their target requirements best and having full control about the numeric state at all stages during monetary processing.
The JSR is lead by Trivadis AG (trivadis.com), Werner Keil (@keilw) and Otavio Santana (@otaviojava)
You can access the API by adding the following Maven dependencies:

<dependency>
  <groupId>javax.money</groupId>
  <artifactId>money-api</artifactId>
  <version>1.1</version>
</dependency>

Further versions can be found here.

The release artifacts should be accessible from the following repositories:

Though it is possible to compile your programs completely with the API, in most cases, you will also have to add an implementation, e.g. the Moneta reference implementation.

Overview

The API basically consists of four packages:

The Java 9 "Jigsaw" module is java.money.

Documentation

Since it a Java Specification Request check out out JSR's specification from the JSR 354 Detail Page.