Java String externalization key missing
I used the Eclipse string externalisation wizard to extract strings which are then stored in a configuration file. Although when I run it I keep getting an NPE whenever a resource or a System.getProperty() is called.
I can't seem to find documentation on this, is there a re开发者_如何转开发ason for this?
Many thanks.
You won't find your externalized through System.getProperty()
.
From the docs of System.getProperty()
:
Gets the system property indicated by the specified key.
When I run the String externalization wizzard I get a class called Messages
on which I can call a .getString
method like this:
Messages.getString("Test.STR0")
精彩评论