Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to get client machine information (OS)?

  Asked By: Nisha    Date: Nov 08    Category: Java    Views: 2912

How to get client machine information with JAVA, like Operating System that client used?



6 Answers Found

Answer #1    Answered By: Jawna Mohammad     Answered On: Nov 08

if your platform is web-based application, one way is using HttpServlet to get informations from client  and another way is using JNLP (Web Start) to settledown some component into client and in this component you could get all informations like System.getProperty("os.name").

Answer #2    Answered By: Venkat Rulez     Answered On: Nov 08

in web or desktop applications?????????????

Answer #3    Answered By: Minal Nayak     Answered On: Nov 08

for desktop:

for web, you can check browser info in HTTP request, but information  may not be available and it can be faked,
the best method here is to use a java  applet (or script) to check system  setting, and send it to server.

Answer #4    Answered By: Haru Tanaka     Answered On: Nov 08

that just for local system, not for client  system

Answer #5    Answered By: Jacob Evans     Answered On: Nov 08

web app, and i have try System.getProperty("os.name").
and that just for local system  not for client  machine."system" that refer to local machine

Answer #6    Answered By: Chaths Massri     Answered On: Nov 08

in HTTP protocol there is field in header "User-Agent"
the browser type is put in this field, but it doesn't show the client  operating system.
so there is no standard way to determine the client operating  system from a request,
there are some alternative ways, the server can ping the host computer for each request and ask the client about operating system,
this may not work in lots of cases due to different reasons.
another way is that server puts an applet in a page, and that applet determines client operating system  using System.getProperty()
since the client is local to applet, this works, and then sends client operating system to server.

Didn't find what you were looking for? Find more on How to get client machine information (OS)? Or get search suggestion and latest updates.