[英]Java Exception: unknown protocol: udp
I am trying to run a basic java program as part of reverse engineering an application. 我试图运行一个基本的Java程序,作为对应用程序进行反向工程的一部分。 I am getting 我正进入(状态
java.net.MalformedURLException: unknown protocol: udp java.net.MalformedURLException:未知协议:udp
exception while running following code 运行以下代码时出现异常
public static void main(String[] args) throws MalformedURLException {
URL url = new URL("udp://xxx.xxxx.com:1234/");
}
Thanks in Advance. 提前致谢。
the problem here is really that udp is not a protocol; 这里的问题实际上是udp不是协议; it's a transport, like tcp. 这是一种运输方式,例如tcp。 You can't use a tcp://host:port/
URL either. 您也不能使用tcp://host:port/
URL。
Cause 原因
You are using a version of the Java Developer Kit (JDK) that was released prior to JDK 1.4. 您正在使用Java开发人员工具包(JDK)的版本,该版本在JDK 1.4之前发布。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.