Stoane Vaughn
Stoane Vaughn

Reputation: 1

Jboss 7.2 - [org.jboss.config] file.encoding - Jboss as windows service

I'm facing some issue when trying to set the file.encoding for jboss. I am trying to setup the file.encoding to UTF-8 by using the

JAVA_OPTS : -Dfile.encoding=UTF-8

Whenever I run the jboss as interactive, I can find the below in the server.log:

file.encoding = UTF-8

Whenever the jboss is running as a windows service, I can find the below in server.log:

file.encoding = Cp1252

In standalone.xml, I also have defined the below system property (but no luck):

<property name="file.encoding" value="UTF-8"/>

<property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>

Would anyone have an idea where we need to do the configuration in order to have file.encoding = UTF-8 when running jboss as a windows service ?

Upvotes: 0

Views: 1079

Answers (1)

Christoph B&#246;hme
Christoph B&#246;hme

Reputation: 4011

If you use the script bin/service.bat to install JBoss 7.2 as a Windows service then the server is started via standalone.bat. This means startup options can be set in bin/standalone.conf.bat.

There is a block of JAVA_OPTS assignments in bin/standalone.conf.bat to which I appended the following two lines

rem # Use UTF-8 as default encoding:
set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8"

After restarting the service, the JBoss instance used UTF-8 as default encoding.

Upvotes: 0

Related Questions