<legend id='Frg8A'><style id='Frg8A'><dir id='Frg8A'><q id='Frg8A'></q></dir></style></legend>
  • <i id='Frg8A'><tr id='Frg8A'><dt id='Frg8A'><q id='Frg8A'><span id='Frg8A'><b id='Frg8A'><form id='Frg8A'><ins id='Frg8A'></ins><ul id='Frg8A'></ul><sub id='Frg8A'></sub></form><legend id='Frg8A'></legend><bdo id='Frg8A'><pre id='Frg8A'><center id='Frg8A'></center></pre></bdo></b><th id='Frg8A'></th></span></q></dt></tr></i><div id='Frg8A'><tfoot id='Frg8A'></tfoot><dl id='Frg8A'><fieldset id='Frg8A'></fieldset></dl></div>
  • <small id='Frg8A'></small><noframes id='Frg8A'>

    1. <tfoot id='Frg8A'></tfoot>

        <bdo id='Frg8A'></bdo><ul id='Frg8A'></ul>

        Java - 查找正在使用的 tzdata 版本,无论 JRE 版本如何

        Java - find tzdata version in use regardless of JRE version(Java - 查找正在使用的 tzdata 版本,无论 JRE 版本如何)

        <i id='xrPHl'><tr id='xrPHl'><dt id='xrPHl'><q id='xrPHl'><span id='xrPHl'><b id='xrPHl'><form id='xrPHl'><ins id='xrPHl'></ins><ul id='xrPHl'></ul><sub id='xrPHl'></sub></form><legend id='xrPHl'></legend><bdo id='xrPHl'><pre id='xrPHl'><center id='xrPHl'></center></pre></bdo></b><th id='xrPHl'></th></span></q></dt></tr></i><div id='xrPHl'><tfoot id='xrPHl'></tfoot><dl id='xrPHl'><fieldset id='xrPHl'></fieldset></dl></div>

              <small id='xrPHl'></small><noframes id='xrPHl'>

            1. <legend id='xrPHl'><style id='xrPHl'><dir id='xrPHl'><q id='xrPHl'></q></dir></style></legend>
                <tbody id='xrPHl'></tbody>
                <bdo id='xrPHl'></bdo><ul id='xrPHl'></ul>

                1. <tfoot id='xrPHl'></tfoot>
                  本文介绍了Java - 查找正在使用的 tzdata 版本,无论 JRE 版本如何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我们有一个简单的实用程序应用程序,它可以读取 JRE 中使用的所有时区数据,并将其全部显示在一个简单的表格中.我们需要为即将发布的产品版本使用旧版本的 JRE (6_24)(显然是由于其他问题),但我们还需要在该版本中包含较新的时区更新(否则将包含在 6_29).我们已经打包了一个将要安装的私有 JRE,因此使用 TZUpdater 工具 不是问题 - 问题是读取/验证哪个版本的 tzdata(例如 tzdata2010o、tzdata2011k)正在使用实用程序应用程序读取(即,在运行应用程序的 JRE 中使用的版本).该应用当前在标题栏中显示 JRE 版本,但随着时区更新,这已不足以确定正在使用的 时区数据 版本.p>

                  我查看了 时区 类,但它似乎没有提供此信息 - 也许有一个系统属性包含此信息?TZUpdater 工具知道正在使用哪个版本,因此它必须在某个地方可用 - 我无法想象他们会分析确定更新工具中正在使用哪个版本...有人知道在哪里可以找到此信息吗?

                  解决方案

                  在我的一个 JRE 中,JRE_PATHlibzi 中有一个名为 ZoneInfoMappings 的文件.在第一行,它显示了您要查找的数据.

                  我将寻找一种不那么骇人听闻的方式,如果我发现了什么,我会更新答案.

                  更新:似乎没有 API 可以获取这些数据.但是,sun.util.calendar.ZoneInfoFile 类中的代码显示了如何解析它.

                  We have a simple utility app that reads all the time zone data used in a JRE and displays it all in a simple table. We need to use an older version of the JRE (6_24) for an upcoming product release (due to other issues apparently), but we also need to include newer time zone updates in that release (that would otherwise be included in, say, 6_29). We're already packaging a private JRE that will be installed, so getting the time zone updates into that private JRE using the TZUpdater tool is not the issue - The issue is reading/verifying which version of the tzdata (e.g. tzdata2010o, tzdata2011k) is being read with the utility app (i.e. which version is being used in the JRE the app is running in). The app currently displays the JRE version in the title bar, but with the time zone updates, that's no longer sufficient to determine which time zone data version is in use.

                  I've looked into the TimeZone class, but it doesn't seem to provide this information - perhaps there is a system property that holds this info? The TZUpdater tool knows which version is being used, so it must be available somewhere - I can't imagine they would analytically determine which version is in use in the update tool... Anybody know where to locate this info?

                  解决方案

                  In one of my JREs, there's a file in JRE_PATHlibzi named ZoneInfoMappings. In the first line it displays the data you are looking for.

                  I'm going to search for a less hackish way, will update answer if I find something.

                  UPDATE: Seems that there's no API to get this data. However, the code in the class sun.util.calendar.ZoneInfoFile shows how to parse it.

                  这篇关于Java - 查找正在使用的 tzdata 版本,无论 JRE 版本如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Java Bytecode Manipulation Library Suggestions(Java 字节码操作库建议)
                  Java CLI UI-design: frameworks or libraries?(Java CLI UI 设计:框架还是库?)
                  About the use of Beans.xml configuration file in Spring Framework application(关于Spring Framework应用中Beans.xml配置文件的使用)
                  What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?(Spring、Struts、Hibernate、JavaServer Faces、Tapestry 有什么区别?)
                  Are there any android application framework like spring?(有没有像spring这样的android应用程序框架?)
                  Java Swing based game framework. Any advice?(基于 Java Swing 的游戏框架.有什么建议吗?)
                  • <i id='pB4sU'><tr id='pB4sU'><dt id='pB4sU'><q id='pB4sU'><span id='pB4sU'><b id='pB4sU'><form id='pB4sU'><ins id='pB4sU'></ins><ul id='pB4sU'></ul><sub id='pB4sU'></sub></form><legend id='pB4sU'></legend><bdo id='pB4sU'><pre id='pB4sU'><center id='pB4sU'></center></pre></bdo></b><th id='pB4sU'></th></span></q></dt></tr></i><div id='pB4sU'><tfoot id='pB4sU'></tfoot><dl id='pB4sU'><fieldset id='pB4sU'></fieldset></dl></div>
                        <tbody id='pB4sU'></tbody>
                        <tfoot id='pB4sU'></tfoot>

                          <legend id='pB4sU'><style id='pB4sU'><dir id='pB4sU'><q id='pB4sU'></q></dir></style></legend>

                          <small id='pB4sU'></small><noframes id='pB4sU'>

                          • <bdo id='pB4sU'></bdo><ul id='pB4sU'></ul>