Solved

How to find the server OS within the applet

Posted on 2002-03-14
11
158 Views
Last Modified: 2010-03-31
I need to find out the OS of the server hosting the applet. How do I find it out?
0
Comment
Question by:pankaj_garg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +3
11 Comments
 

Expert Comment

by:maggari
ID: 6865057
use this:

System.getProperty("os.name");

It will return a string.
0
 

Expert Comment

by:maggari
ID: 6865123
I'm sorry but this returns the operating system information of just the client(i.e the system in which the applet is running). Due to security issues you might not be able to get such an information of another system from an applet( in this case, the client browser is asking the server system's information).
0
 
LVL 9

Expert Comment

by:Venci75
ID: 6865225
I don't thinik it is possible. You can only understand that is the http server on this host.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Expert Comment

by:maggari
ID: 6865366
I'm sorry but this returns the operating system information of just the client(i.e the system in which the applet is running). Due to security issues you might not be able to get such an information of another system from an applet( in this case, the client browser is asking the server system's information).
0
 

Author Comment

by:pankaj_garg
ID: 6865742
I realized that this is not possible. May be I will have to write a servlet or a perl/cgi program which passes one parameter to this applet
0
 
LVL 92

Expert Comment

by:objects
ID: 6866139
Just enter the OS as a parameter in your applet's html.
0
 

Expert Comment

by:fundoosathish
ID: 6876175
No, i dont think its possible to know of the OS the server is running in and this info might be blocked for security reasons.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 6878495
You can use the Applet to make a connection to its own server, call getHeaderFields() of URLConnection and parse out the OS field
0
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 6878507
A lot simpler to just pass the required information in the applet's parameters.

<applet code="myapplet.class">
<param name="serveros" value="Linux">
</applet>
0
 

Author Comment

by:pankaj_garg
ID: 6879105
Objects,
     I agree with you that passing a parameter is the simplest way.

Thanks
Pankaj
0
 
LVL 92

Expert Comment

by:objects
ID: 6879145
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question