3 Replies Latest reply on Apr 12, 2012 1:18 PM by Dominik Grupp

    default file.encoding

    sue sue Newbie

      Hello,

      I am looking for help about changing the default file.encoding on Jboss.

      I installed Jboss-3.2.3(apache Tomcat 5.0.16) on linux 2.4.9-e.37.
      in boot.log, it shows that the file.encoding is ISO-8859-1. I would like to change it to UTF-8.

      I tried:

      in .bashrc, set the following:

      JAVA_OPTS=-Dfile.encoding=UTF-8
      ANT_OPTS=-Dfile.encoding=UTF-8
      LC_CTYPE=en_US.UTF-8

      in run.sh and run.conf set the following:

      JAVA_OPTS=-Dfile.encoding=UTF-8

      restart jboss.

      The result I got:
      Form file Test.java

      import java.util.*
      import java.io.*

      public class Test {
      public static void main(){
      System.out.println(getProperty("file.encoding"));
      System.out.println(ImputStreamReader(System.in).getEncoding());
      }
      }

      on command line:
      >javac Test.java
      >java Test
      >UTF-8
      >UTF8


      in boot.log:
      file.encoding: ISO-8859-1

      It doesn't seem that jboss takes the modification of the value of the file.encoding and overwrites the value of file.encoding from JVM.

      Is there any place where one can set the default file.encoding?

      Thanks,

      Sue