Since for write the Java source codes, wsimport
use an instance of java.io.PrintWriter
, and each line is write it with the method java.io.PrintWriter.println
, this depends of the enviroment.
import com.sun.tools.internal.ws.WsImport;
public class Main {
static {
System.getProperties().put("line.separator", "\n"); \\ or "\r\n"
}
public static void main(String[] args) throws Throwable {
WsImport.main("service.wsdl -Xnocompile".split("\\s+"));
}
}
For the charset, this:
The default charset is determined during virtual-machine startup and typically depends upon the locale and charset of the underlying operating system.
You can specified this with the next arg in the virtual machine:
-Dfile.encoding=UTF-8