Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to find the server OS within the applet

Posted on 2002-03-14
11
Medium Priority
?
161 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 300 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

609 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