在Windows cmd中运行带有所有问号的java

时间:2015-01-05 04:17:54

标签: java windows cmd

C:\Users\yanglu>javac
??: javac <options> <source files>
??, ???????:
  -g                         ????????
  -g:none                    ?????????
  -g:{lines,vars,source}     ?????????
  -nowarn                    ???????
  -verbose                   ?????????????????
  -deprecation               ???????? API ????
  -classpath <??>            ???????????????????
  -cp <??>                   ???????????????????
  -sourcepath <??>           ????????????
  -bootclasspath <??>        ??????????
  -extdirs <??>              ??????????
  -endorseddirs <??>         ????????????
  -proc:{none,only}          ???????????/????
  -processor <class1>[,<class2>,<class3>...] ?????????????; ?????????
  -processorpath <??>        ?????????????
  -parameters                ???????????????
  -d <??>                    ?????????????
  -s <??>                    ?????????????
  -h <??>                    ????????????????
  -implicit:{none,class}     ????????????????
  -encoding <??>             ????????????
  -source <???>              ?????????????
  -target <???>              ???? VM ??????
  -profile <????>            ?????? API ???????????
  -version                   ????
  -help                      ?????????
  -A???[=?]                  ????????????
  -X                         ??????????
  -J<??>                     ??? <??> ????????
  -Werror                    ?????????
  @<???>                     ???????????

我的电脑的默认语言是英语。有谁能告诉我如何解决这个问题?

2 个答案:

答案 0 :(得分:0)

看起来Java正在使用亚洲语言作为默认语言,Windows无法显示它。不确定为什么,但是你可以通过使用以下方式让Javac临时使用美国英语:

javac -J-Duser.language=en -J-Duser.country=US <other arguments>

答案 1 :(得分:0)

给出的所有建议都是好建议:

1)如果您确定您的PC是英语 - 那么听起来您的JDK不是。考虑获取已知的英语JDK并安装它。

2)尝试chcp 437命令,

......或......

3)失败一切,尝试神奇的java -Duser.language=en -Duser.country=US咒语。