So putting it into the conf directory is not a solution.
Here is the class again. Using static methods and static variables.
class ResourceBundleMessages {
private static final String BUNDLE_NAME = "i18n/messages"
private static final ResourceBundle resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME)
public static String getString(MessageKey key, Object... params) {
try {
if (params.size() > 0) {
return MessageFormat.format(resourceBundle.getString(key.messageKey), params)
} else {
return resourceBundle.getString(key.messageKey)
}
}catch (MissingResourceException e) {
log.error("Unable to find Message in message.properties for property of key ${key}", e)
return '!' + key + '!';
}
}
}The class and the .properties file are in a jar file that is in the lib directory of the Vert.x module.
java.lang.NoClassDefFoundError: Could not initialize class com.hdpoker.gameserver.core.message.domain.systemnotification.ResourceBundleMessages
I am sure it is not finding the .properties file which is in the jar file in the correct location. I know it isn't the classes in the jar as our module uses many of the other classes in the jar file without any issues.
Any ideas why it doesn't see the properties file in the jar file, but did when the same path is in the conf directory of Vert.x 2.1.3
Thanks
Mark