I'm using Java 6 with GWT 2.4.
I want to get client's Operating System's user friendly name using either Java Or GWT Or JavaScript.
How can I do so?
I've tried using System.getProperty("os.name")
, but this gives me the machine on which my WAR is running. I want the same of client's (who is accessing my WAR) machine.
I've also tried using httpServletRequest.getHeader("User-Agent")
. This gives me String like 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0'.
Now here Windows NT 6.1 is the technical name of the client's computer's OS. As you can see here, it is mapped to two user friendly names of Windows, that are Windows 7 & Windows Server 2008 R2.
I want the direct name of OS of client's machine, either Windows 7 or Windows Server 2008 R2.
How can I achieve this?