Reputation: 4103
I'm facing problems with the UTF-8 encoding on Heroku. I need to pass the argument -encoding UTF-8
to javac
while compiling.
How can I achieve it?
Seems like a stupid and simple question but couldn't find any solution online.
Thank you.
Upvotes: 0
Views: 241
Reputation: 1003
Assuming you're using Maven, you can pass compiler arguments using the maven-compiler-plugin like this:
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<compilerArgument>-encoding UTF-8</compilerArgument>
</configuration>
</plugin>
</plugins>
[...]
</build>
[...]
</project>
(I didn't actually test this snippet). Doc is here:
http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html
Upvotes: 1