“package java.net.http does not exist” error on JDK9
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a problem compiling simple blocking GET example from the HttpRequest JavaDoc: package org.example; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import static java.net.http.HttpRequest.noBody; import static java.net.http.HttpResponse.asString; public class Http2 { public static void main(String[] args) throws URISyntaxException, IOException, InterruptedException { HttpResponse response = HttpRequest .create(new URI("http://www