1、
System.setProperty("jna.encoding","GBK")
2、
StringBuilder stringBuilder = new StringBuilder(); Process process = null; try { process = Runtime.getRuntime().exec(cmdCommand); BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(process.getInputStream(), "GBK")); String line = null; while((line=bufferedReader.readLine()) != null) { stringBuilder.append(line+" "); c.jDisplayText.append(line+" "); } return stringBuilder.toString(); } catch (Exception e) { e.printStackTrace(); return null; }