My problem is best explained in the example: The following program runs on a Linux system that is not in Unicode mode, but in ISO-8859-15. The environment is set as follows:LC_CTYPE=de_DE@euro
import java.io.*;
import java.util.*;
public class UnicodeTest {
public static void main(String[] args) throws Exception {
Runtime.getRuntime().exec(new String[] { "foobar", "äöü" });
}
}
When I compile this program on the command line with javacand run it, it foobartakes the argument correctly äöü, in ISO-8859-1. The same program, launched from Netbeans, passes the argument as Unicode, which makes it unusable in the called program. The same thing happens in Tomcat when this method is called. Which parameter or environment variable Runtime.exec()does Java use to determine how to pass arguments to ?
source
share