问题
I am trying to run a basic java program as part of reverse engineering an application. I am getting
java.net.MalformedURLException: unknown protocol: 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.
回答1:
the problem here is really that udp is not a protocol; it's a transport, like tcp. You can't use a tcp://host:port/
URL either.
回答2:
Cause
You are using a version of the Java Developer Kit (JDK) that was released prior to JDK 1.4.
来源:https://stackoverflow.com/questions/28437232/java-exception-unknown-protocol-udp