Solved

How to find the server OS within the applet

Posted on 2002-03-14
11
157 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
  • 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to convert String matching to regex in java 4 52
ejb wildfly example 2 29
jsp login check 12 43
restrict decimal places for double datatype 10 22
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

820 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