Grails: Native2ascii error when I add a new property to message.properties

后端 未结 6 1163
南方客
南方客 2021-02-07 22:57

I get a strange error when I add a new property to message.properties file in my grails application during runtime. When I restart the application via the command line, or resta

6条回答
  •  时光取名叫无心
    2021-02-08 00:02

    I had a similar error when compiling Grails 2 from the command line under linux.

    Error packaging application: Error occurred processing message bundles: Error starting Sun's native2ascii:
    ...
    Caused by: : Error starting Sun's native2ascii: 
    ...
    Caused by: java.lang.ClassNotFoundException: sun.tools.native2ascii.Main`
    

    I solved it by setting JAVA_HOME to JDK as mentioned above, something like

    JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.161.x86_64
    

    and not:

    JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64
    

    also include $JAVA_HOME/bin in the PATH variable

提交回复
热议问题