We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
由于 JSR-275 已被拒绝,因此无法使用 javax 命名空间,并已被命名空间 org.unitsofmeasurement 取代。 JScience 实现 已发布,撰写本文时最新的是 2012 年 10 月版本 4.3.1。
干杯,
Jean-Marie Dautelle(JScience 项目所有者)
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)
虽然 JScience 也计划在某个时候实现它,但请注意 JSR 363,新的 Java 测量单位标准(JSR 275 的后继者)已在早期草案阶段提供,请参阅 http://unitsofmeasurement.github.io/
您还可以在 MavenCentral 等地方找到 API 和 RI。
维尔纳
(钴规格主管,JSR 363)
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)
正如 @WernerKeil 提到的,替代品似乎是 JSR 363。我做了一些研究(这些东西很难找到,散布在各处,没有清晰的概述,这就是我在这里发布此内容的原因),看来您需要引入已发布的 unitofmeasurement 依赖项,例如 来自 Maven,如下所示:
然后在最终的应用程序中,您需要一个实现,例如 < a href="https://github.com/unitsofmeasurement/unit-ri" rel="nofollow noreferrer">参考实现,例如 来自 Maven:
我还没有尝试过这个,但是到目前为止,这看起来是最有希望的。
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:
Then in the final application you'll want an implementation, such as the reference implementation, e.g. from Maven:
I haven't tried this yet, but that looks the most promising so far.