java scanner 接收鍵盤輸入 中文亂碼問題

Scanner in = new Scanner(System.in); String s = in.nextLine(); System.out.println(s); 這麼接收鍵盤輸入中文,在控制檯輸出的是亂碼。 看了很多方法 包括把整個myeclipse的編碼改成了GBK 在scanner輸入後 進行編碼轉換 都沒管用 最後看了篇文章找到了解決我這個問題的方法 runas configura
相關文章
相關標籤/搜索