tools.jar exists, but cant find sun.security.tools.JarSignerResources

巧了我就是萌 提交于 2020-01-17 07:57:10

问题


I am seeing the following exception (on a Linux Java6-sun install, but not on OSX)

Caused by: java.util.MissingResourceException: Can't find bundle for base name sun.security.tools.JarSignerResources, locale en_US
 at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
 at java.util.ResourceBundle.getBundleImpl(Unknown Source)
 at java.util.ResourceBundle.getBundle(Unknown Source)
 at com.wuntee.aat.security.tools.JarSigner.<clinit>(JarSigner.java:96)
 ... 12 more

but, I can see that the tools.jar exists in the java install directory, and that tools.jar contains the JarSignerResource class. Any ideas?


回答1:


The problem is not related with not finding the jar. The problem is related with not finding some resource for en_US locale within the jar instead. Two things can be happening:

  1. if you open the tools.jar file and check the content of sun\security\tools you will find that one of them doesn't have the resource JarSignerResources_en_US.class, or
  2. check the default locate of the two different OS you are using: one of them should be en_US and the other is not. This is most probable.


来源:https://stackoverflow.com/questions/7612985/tools-jar-exists-but-cant-find-sun-security-tools-jarsignerresources

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!