<% System.getProperty("os.name") %> can be used to identify the OS name running in the server machine. But how can i identify the OS information in the client machine using java in a web application?
4 Answers
You can't. The browser doesn't send detailed OS information to web servers.
You can do some wild guess from the user-agent but that's not accurate at all.
2 Comments
Rahul Garg
yes they do you can see stat in Google Analytics it show alot of data of client and only by javascript code so this can be done
ZZ Coder
If you run software on client (including Javascript), it's a totally different issue. Some website can even fetch your computer serial number with ActiveX but I guess that's not the original question.
if you can use javascript you can simply find the navigator.appVersion and use it to determine the OS like if the appVersions is Windows 5.0, this means that the system is using Windows XP.
1 Comment
dfa
System.getProperty("os.name") returns the server's os name