internal/importers/java: specify language for javap command by -J-Duser.language=en
In Japanese environment, `javap` report errors in Japanese. ``` $ /usr/bin/javap -s -protected -constants com.example.ExampleClass エラー: クラスが見つかりません: com.example.ExampleClass ``` But `java.Importer.Import` handles errors using `javap`'s output in English. So `javap` should be called with `-J-Duser.language=en` option. Fixes golang/go#17987 Change-Id: I63d30cd49446523e54df2beae8d3f09f9de9bca5 Reviewed-on: https://go-review.googlesource.com/33371 Reviewed-by: Elias Naur <elias.naur@gmail.com>
This commit is contained in:
parent
98823363be
commit
48338d0785
|
@ -355,7 +355,7 @@ func (j *importer) importClasses(names []string, allowMissingClasses bool) ([]*C
|
|||
if len(names) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
args := []string{"-s", "-protected", "-constants"}
|
||||
args := []string{"-J-Duser.language=en", "-s", "-protected", "-constants"}
|
||||
if j.clspath != "" {
|
||||
args = append(args, "-classpath", j.clspath)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue