How to get the server os name and version

S

super.sumanth

Hello,

I am a new bie in programming with java. I have an applet in which I
need to display the OS running on the server. Please let me know how to
get it.
I used System.getOS() but this returns the clients OS.

Thanks in advance.

--Sumanth
 
A

Andrew Thompson

Sub: How to get the server os name and version

The only way is for the server to 'tell' the applet. *

I am a new bie in programming with java. I have an applet in which I
need to display the OS running on the server. Please let me know how to
get it.

* For example, you might put a JSP on the (Java based)
server that reports the information required by the applet,
and the applet parses and extracts the information.

More directly, you might write those properties to
applet parameters.
I used System.getOS()

Huh? Is that a new method in 1.6?
...but this returns the clients OS.

As an aside - why the heck are your visitors
the slightest bit interested in your server?

Andrew T.
 
G

Gordon Beaton

Sub: How to get the server os name and version

The only way is for the server to 'tell' the applet. *

However, realize that no security-minded admin will voluntarily[*]
make that information available to any client.

In fact it's common for servers to provide misleading information
about OS and server software versions, in order to avoid certain types
of attacks that might otherwise present themselves.

Why would a benevolent client need to know the server OS?

[*] That said, have a look here:
http://uptime.netcraft.com/up/graph
http://uptime.netcraft.com/up/accuracy.html

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,270
Messages
2,571,102
Members
48,773
Latest member
Kaybee

Latest Threads

Top