###@###.### 2003-11-20
J2SE Version (please include all output from java -version flag):
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b28)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b28, mixed mode)
Does this problem occur on J2SE 1.4 or 1.4.1 or 1.4.2? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Windows XP
Bug Description:
Creating a socket with a Japanese host name throws not
UnknownHostException but IllegalArgumentException.
Steps to Reproduce (be specific):
The following is the sample program to reproduce the problem. Just compile and run it:
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
class SocketTest {
public static void main(String[] args) {
try {
Socket s = new Socket("\u67f4\u7530\u82b3\u6a39", 8000);
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
- relates to
-
JDK-5017871 REGRESSION:create a socket with a Japanese hostname throws IllegalArgumentExcept
- Resolved
-
JDK-5039471 test/sun/misc/URLClassPath test files are undeletable on Windows
- Resolved
-
JDK-4959892 java.net.URI class doesn't support non-ascii hostnames
- Closed