Edit: or will ever be. It is definitely explicitly not an equivalent of go's net/http. Indeed, there is probably never going to be an equivalent of net/http in the Java stdlib (since they prefer to rely on the user choosing one of the existing server frameworks, such as Jetty).
> Provide a command-line tool to start a minimal web server that serves static files only. No CGI or servlet-like functionality is available. This tool will be useful for prototyping, ad-hoc coding, and testing purposes, particularly in educational contexts.
> It is not a goal to provide a feature-rich or commercial-grade server. Far better alternatives exist in the form of server frameworks (e.g., Jetty, Netty, and Grizzly) and production servers (e.g., Apache Tomcat, Apache httpd, and NGINX).
https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver...
I see it's still available after the modularization effort, and it is:
https://docs.oracle.com/en/java/javase/18/docs/api/jdk.https...
That server is not remotely comparable to the one in Go.
The Java one is not usable in anything beyond hello world, and is explicitly not intended to be.
I mean it would be trivial to implement that reverse proxy in Go. And I do mean trivial; Go also includes a reverse proxy utility, so you can implement something basic in about 5 LOC.
At this point it’s hard to believe you’re being genuine.
A weekend project and going at scale isn't the same thing.
https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver...