Java Extension mechanism to load resource bundles as UTF-8 files.
This maven project generates a jar when included as a Java Extension in the JavaVM Runtime will load resource bundles as UTF-8.
By default it will load as UTF-8 all bundles that start with resources
. (e.g. resources.ApplicationResources
).
The default value can be overridden defining the system property utf8.resources.base.names
as a comma separated list of baseName prefixes (e.g -Dutf8.resources.base.names=resources,contents
)
will load all bundles that start with resources
or contents
as UTF-8
encoded files.
- Create jar file :
mvn clean package
- Testing :
mvn clean package integration-test
- Check the latest release HERE and download the jar file.
- Place it in some $PATH_TO_JAR_LOCATION directory (note: this directory should contain only the jar file for the extension mechanism to work properly)
- Choose your poison
- copy the jar file to
$JAVA_HOME/jre/lib/ext
and pray
export MAVEN_OPTS="$MAVEN_OPTS -Djava.ext.dirs=$JAVA_HOME/jre/lib/ext:$PATH_TO_JAR_LOCATION"
java -jar -Djava.ext.dirs=$JAVA_HOME/jre/lib/ext:$PATH_TO_JAR_LOCATION sample-app.jar