Solved

How to find the server OS within the applet

Posted on 2002-03-14
11
159 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

724 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