试试这个: import java.awt.im.*; public class _Test { public static void main(String[] args) { InputContext context = InputContext.getInstance(); System.out.println(context.getLocale().toString()); } }