Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > applet getting client computer OS information

Reply
Thread Tools

applet getting client computer OS information

 
 
jaqu@NOSPAM.ORG
Guest
Posts: n/a
 
      01-09-2005
Hello,

I am new with sun java (prev used msvj++)

how can I get client OS information (mostely Windows) like OS ver., SP
installed, memory installed, etc. in applet ?

any clues?

regards,
jaqu
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      01-09-2005


http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:


> how can I get client OS information (mostely Windows) like OS ver., SP
> installed, memory installed, etc. in applet ?


In Java you can read out properties, some properties are listed here:
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties()>
so the OS version should be accessible with
java.lang.System.getProperty("os.name") + " " +
java.lang.System.getProperty("os.version")
but as you are asking for applets be aware that an applet often is not
allowed to access all existing properties. I have not tried those two
properties used above in an applet so check yourself.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      01-09-2005
On Sun, 09 Jan 2005 15:05:36 +0100, Martin Honnen wrote:

> (E-Mail Removed) wrote:
>
>
>> how can I get client OS information (mostely Windows) like OS ver., SP


(shrugs vaguely) What is 'SP' exactly? Service Pack?

>> installed, memory installed,


AFAIR, there is no access to tose numbers from S.gP, or
that I can otherwise locate.

>>.. etc. in applet ?

>
> In Java you can read out properties, some properties are listed here:
> <http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties()>


[1]

> so the OS version should be accessible with
> java.lang.System.getProperty("os.name") + " " +
> java.lang.System.getProperty("os.version")
> but as you are asking for applets be aware that an applet often is not
> allowed to access all existing properties.


You can check here. This applet accesses system properties
and is unsigned.
<http://www.physci.org/pc/property.jsp>

>..I have not tried those two properties used above in an applet


Those work without problem, it is more the 'user' settings and
a lot of the Java specific properties that are restricted,

>..so check yourself.


Well (shrugs) since the information was so close.

[1] As an aside, System.getProperties() will not work unless
the applet is signed. Roedy Green's properties applet (linked
from mine) *is* signed, so his calls System.getProperties and
simply enumerates the entire set. My version keeps a list of
common properties and requests each specifically.

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting information about Jar file from Applet erictetz@gmail.com Java 1 09-13-2007 12:24 AM
Applet : Getting information from applet Jimmy Halim Java 0 04-04-2005 04:01 AM
strange information from asp.net trace / getting performance information using WebRequest and StreamReader z. f. ASP .Net 0 02-03-2005 11:23 AM
Authenticate as computer when computer information is available IT Boy MCSE 0 11-12-2004 12:41 PM
Getting CLient Information Mike Grahn ASP .Net 0 06-12-2004 08:38 PM



Advertisments