Note that this not a Java question

I guess one way is to query this to the web server running on that system. (Obviously this requires the host to have a web server running)
Query
www.java-forums.org using the following web interface:
View HTTP Request and Response Header
It will report that the web server is Apache running on a unix system. I don't think there is any clear way to obtain this information from any host. You can just guess that info by looking at the services running on ports and their versions possibility.