mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-21 21:33:07 +00:00
8214514: javac @file option gives error caused by Chinese encoding in the path
Reviewed-by: jjg
This commit is contained in:
parent
89f719be62
commit
2cbcba3afc
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,6 +27,7 @@ package com.sun.tools.javac.main;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
@ -125,7 +126,7 @@ public class CommandLine {
|
||||
}
|
||||
|
||||
private static void loadCmdFile(String name, List<String> args) throws IOException {
|
||||
try (Reader r = Files.newBufferedReader(Paths.get(name))) {
|
||||
try (Reader r = Files.newBufferedReader(Paths.get(name), Charset.defaultCharset())) {
|
||||
Tokenizer t = new Tokenizer(r);
|
||||
String s;
|
||||
while ((s = t.nextToken()) != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user