• Post Reply Bookmark Topic Watch Topic
  • New Topic

I need to find client system details using web project  RSS feed

 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

Currently i am working for client module. My requirement is i need to find client system information, when the user selected checkBox option from browser(my Page).
java installed
java version
Flash Player installed
Operating System Name
RAM Info
Processor Info
os is Windows then service pack
browser details and add-on enabled
System has sound card or not
System has micro phone and recording feature enabled
Speark attached
Broadband details
ISP provider info & IP address of current system
Is the system is connected through LAN/Airport/Wifi
System enabled Firewall
System has antivirus details

if the above information is not found in the client PC (windows & Mac) then i should prompt the user message.

Is there any java code is available for the above requirement.

Please tell me what is the best way to proceeds the above task.


Thanks
saravanan
 
Des Robin
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

System.getProperty will get you the java bits and os name.

Runtime.getRuntime().maxMemory(); will get the available memory (as opposed to the physical memory). Ram and CPU info is not so easy to discover. Apparently for the Oracle JVM you could use:

((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();

You would have to look at the various browsers to see how to get the info you want.

The flash info might be derived from some of the install files.

By broadband details, I assume you mean connection speed? I wouldn't have thought that was really something for Java to do - you might get the theoretical performance info from the hardware but without a speed test you wouldn't have actual info (my LTE phone can theoretically download 50Mb a second, but I'm currently in a GPRS only zone).

The antivirus and firewall info would be heavily dependent on the product(s) being used.

You could try the AudioSystem API for speaker processing.

Cheers
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

Thanks for your message, It is really very helpful to me.

We have done the same as a poc, which is running as a standalone program in our PC.
We got few information but we could not able to get entire information such as RAM, PROCESSOR speed, ISP provide details with speed, firewall details & antivirus info.

Can you tell me? how to implement it in Java application(exp: system.getProperty()) that to be run in client system? what is the best way?
Is it we have to write applets? for implementing this concepts?

Is it any Java API is there to get info?

Please share to me back if you knows more.

Very helpful to me if you share some samples.

Thanks in advance.

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to do this in Java, then either an applet or a WebStart app would be the way to go. Either would have to be signed to get at some of the info you mention. And they would need to ship with some native code accessed via JNI, because there is no pure-Java way to get at some of the info.

If you can restrict this to running on a single browser on a single OS, then an ActiveX control for IE might do the trick.
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply.
I gone through some applets sample pages, says that applets are embedded in html and it will be running within browser, will not run client system (JVM). So, we can not able to fetch system resource like (OS, RAM, and other info).

http://www.javaexamples.org/java/java.applet/what-is-applet.html

Please help me if you have any sample please share me.

If i want to use JNI means how to use. Just give an sample for getting os name from client system. Then the remaining and all i will take it.

This will be very helpful to me.

Thanks
saravanan
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saravanan sambandam wrote:
If i want to use JNI means how to use.


you should be aware that as of JDK/JRE after 1.7.0_45 the security model for Applets will be tightened and you will need to sign your Applet jar file using a private key with associated certificate signed by one of the major Certification Authorities. This will cost you each and every year. Even without the Applet signing restrictions I would not trust any Web based program (regardless of the language it is written in) that asks for the information that you seem to want and I would be uncomfortable with any program installed on my system that needed all that information. The question has to be - what necessitates you obtaining that information?




 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

Thanks for your message, I gone through some url about types of applets(sandbox, privilege) and also Java web Start. Here what they are saying if the applets will run within sandbox, then we can not access the system resources. Meaning that more restricted.
Privilege applet can access user system information which has signed and the piece file would be deployed in JNLP location web server.
So the 2nd approach will be better for my requirement. They didn't mentioned the private key and cost and all.

Please let me know my understanding is correct or not?

The requirement is: we have launched on site (collegeConnect) which will allow the user (parent of the student) to upload .mp3 files/voice recording info. College principle will here the details about queries/answers and so on.....

uploading file will be infected or not, or System will not have the features such as mentioned above. So that i need to check it out before launching the site.

This is my requirements.

Please let me know your valuable suggestion and this will be very helpful to complete my module.

Thanks
saravan
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose you were able to detect that the client computer has an antivirus installed, would you trust that the file they are uploading is not infected?
I get that you don't want infected files to be uploaded but I think you are going about the solution the wrong way. It is unlikely that you will be able to completely eliminate risks of getting virus files uploaded but you can use sensible solutions that most people use.

For starters run your server on a more virus resilient operating system like linux as a non privileged user. You can check if it's a valid file or even check for viruses on that file before moving it onto a server that that has more protected data. The server receiving the files should also only run the minimal required software (no browsers e.t.c).

Basically, I'm saying it's better to have sensible (widely acceptable) security standards than trying to make the client computers more insecure with interrogating them for their software which is not guaranteed to be fool proof anyway. Even my bank's website produces a pdf statement when I want to download a statement from their site and they give me a link saying "Download a pdf reader here if you don't have one". They don't try to interrogate my computer to see if I have Acrobat e.t.c.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I'm missing something. How is "the uploaded file must not be infected" the same as "find client system information"? And as Richard said, how is all the stuff you wish to find out related to security?

I second E Armitage's point about doing something about file security on the server, not on the client. Running a clamav process to check incoming files would a low-cost scenario, although for a college/university the cost should not be the main deciding factor.
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please give me some information. So that i can able to proceeds.

I am eagerly looking for your help.

thanks
saravanan
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saravanan sambandam wrote:
Please give me some information. So that i can able to proceeds.


I have a great problem in understanding how obraining all that information will help you and the desire to collect it smells of "Big Brother". The consensus seems to be that what you are trying to do is not realistic, is back to front and does not make sense. You need a re-think maybe along the lines of that proposed by E Armitage

i.e.
"For starters run your server on a more virus resilient operating system like linux as a non privileged user."

and

"Basically, I'm saying it's better to have sensible (widely acceptable) security standards than trying to make the client computers more insecure with interrogating them for their software which is not guaranteed to be fool proof anyway. Even my bank's website produces a pdf statement when I want to download a statement from their site and they give me a link saying "Download a pdf reader here if you don't have one". They don't try to interrogate my computer to see if I have Acrobat e.t.c." .

 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

Thanks for your message.

Is there any other way is there to getting info of client system information such as
os name
service pack
jre version
.net framework installed
browser version
screen resolution - these above information i can get through javascript.

i need to check client ISP details, speaker & micro phone enabled or not. if enabled recording should stored.
RAM & processor model and speed.
upload & download speed.

these information i need to get. Can you please tell me what is the best approach.
I am unaware about this. If you give some useful link and information i will proceeds further.

Because a lot task i completed through this site only.
I hope you have understood my requirement.

Thanks
saravanan
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saravanan sambandam wrote:i need to check client ISP details, speaker & micro phone enabled or not. if enabled recording should stored. RAM & processor model and speed. upload & download speed.

But why? You're just repeating that you need it, but you're not why you need it.
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need those information that is why i have repeated and also our talk should not divert.

Student parent don't have facility to record their wish, and broad band speed not much faster, and system speed is very low then we will check it out and intimate them before getting our collegeConnect site.

Please give your some useful information.

Thanks
saravanan
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't seem to realize that sometimes the best way to solve a problem is to take a step back, and reconsider some of the underlying assumptions made so far.

I'm going to bow out at this point - you got multiple suggestions on what to check out, and what might be better approaches, but it doesn't seem that you seriously followed up on any of them.
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf Dittmer,

I decided to go ahead with java web start approach. In this way can i get client system resources means that i plan to run small java application that will get the system properties.

Hi, i am blind so that i am asking you the best approach, but you people are saying me beyond my limit (means unknown areas). If you give some point i will look into that and then i will work on that.

If you know please help me.

Thanks
saravanan
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a lot of relevant information about JWS in http://docs.oracle.com/javase/tutorial/deployment/webstart/index.html, particularly the "Deploying" and "Security" pages.
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the message.

Is this approach is correct? i am right isn't?
If wrong please let me know i will correct it. Some body saying that if i go with JMX then i can able to all information.
Is JMX is correct?

Please let me know!. Because you know my above requirement.

Its really a challenging jobs.....

Thanks for your solicit supports.


Thanks
saravanan S
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JMX is an API - you need Java code to use it, so there's still a WebStart app to be written that also needs to be signed, otherwise JMX has no access to all that info. And, as I already pointed out, you still need JNI to get some of it. All of that taken together presents some formidable development and deployment obstacles, but this has all been mentioned already, so no point going over it again.

You're set on going down a path that is -in my opinion, and the opinion of some other people posting in this topic, who (with all due respect to you) all seem to be more experienced- fundamentally flawed. It is also far from trivial, so be prepared for challenges.
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

I created java desktop application and deployed it in server using JNLP(Java Web start). Which is giving system properties of client system. Because its running as a desktop application, how can i get the data back to my servlet. So that i will do the remaining some logic and update it in DB.

Means jsp ---> servlet -----(javawebstart/standalone application) -----> servlet.

If any one know please help me.

thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP would be the standard approach. The java.net.HttpURLConnection class can be used for that.
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks a lot for your message.

I searched in google and there is no sample.

Do you have any idea where should i call exactly. Because we are hitting the jnlp url on the browser. so the application(piece) getting download and run. In this time there is no communication between them.

can you tell some tips. So that i will write the code in the required place for both communication.

Thanks


 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's Java code, so it would go into the WebStart app.

I searched in google and there is no sample.

What phrase did you search for? I'm getting 133000 results for "example HttpURLConnection".
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks.

I had used httpURLConnection for fetching data from the third party service. Suppose the service is available. Here in my case my application downloaded and running as a standalone application @ user end and having value of 111111. The value of 111111 should be send it back to my servlet. Here, my standalone application have no control. So, how it will communicate back to servlet.

This is my doubt.
Give some more tips. I will grape it.

thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The value of 111111 should be send it back to my servlet. Here, my standalone application have no control. So, how it will communicate back to servlet.

I don't understand this. Why does the app "have no control" mean? It's the app from where the value should be sent to the servlet, right? Which problem do you see with doing that?
 
saravanan sambandam
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have created the servlet
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jnlp.sample.servlet.JnlpDownloadServlet;

/**
* Servlet implementation class TestJNLPServlet
*/
public class TestJNLPServlet extends JnlpDownloadServlet {
private static final long serialVersionUID = 1L;

/**
* @see JnlpDownloadServlet#JnlpDownloadServlet()
*/
public TestJNLPServlet() {
super();
// TODO Auto-generated constructor stub
}

/**
* @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
*/
protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
HttpServletRequest _req = (HttpServletRequest) req;

res.setContentType("application/x-java-jnlp-file");

_req.getRequestDispatcher("/index.jsp").include(req, res);
}


and i created html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<a href="/TestJnlp?name=annamalai&arg=10"> lanuch </a>
</body>
</html>

.jnlp file

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" codebase="http://localhost:8080/">
<information>
<title>WebPad 1.0</title>
<vendor>Sun Microsystems, Inc.</vendor>
</information>
<resources>
<property name="jnlp.publish-url" value="http://localhost:8080/PassParamToJNLP"/>
<j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="TestJnlp.jar" version="1.0"/>

</resources>
<application-desc main-class="TestJnlp">
<argument> <% request.getParameter("name"); %> </argument>
<argument> <% request.getParameter("age"); %> </argument>
</application-desc>
<security>
<all-permissions/>
</security>

when i click the link i am getting the exception

HTTP Status 404 - /PassParamToJNLP/TestJnlp

type Status report

message /PassParamToJNLP/TestJnlp

description The requested resource is not available.

Apache Tomcat/7.0.33
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!