We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this questionJSR 275 seems to be in a rejected state. JScience seems to have an implementation and there seems to be unitsofmeasure.
- Are there any other open source implementations?
- Which package is jsr-275 compliant and easy to use.
Since the JSR-275 has been rejected the javax namespace cannot be used and has been replaced by the namespace org.unitsofmeasurement. The JScience implementation has been released, latest as of this writing is version 4.3.1 in Oct 2012. Cheers, Jean-Marie Dautelle (JScience project owner)
While JScience also plans to implement it at some point, please note JSR 363, the new Units of Measurement standard for Java (successor to JSR 275) is available in Early Draft stage, see http://unitsofmeasurement.github.io/ You'll also find the API and RI in places like MavenCentral.
Werner (Co Spec Lead, JSR 363)
As @WernerKeil mentioned, the replacement seems to be JSR 363. I did a bit of research (this stuff is hard to find, scattered around everywhere with no clear overview, which is why I post this here) and it appears that you'll want to bring in the released unitofmeasurement dependency, e.g. from Maven like this:
<dependency>
<groupId>javax.measure</groupId>
<artifactId>unit-api</artifactId>
<version>1.0</version>
</dependency>
Then in the final application you'll want an implementation, such as the reference implementation, e.g. from Maven:
<dependency>
<groupId>tec.units</groupId>
<artifactId>unit-ri</artifactId>
<version>1.0.2</version>
</dependency>
I haven't tried this yet, but that looks the most promising so far.
精彩评论