• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I obtain user data

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way within Java to detect what OS a user is using and what username they logged in as? In .net there was an environment object I could use to get information about the system...I'm sure there's something in Java...but I'm not sure what it is. Thanks for your help in advance.

also - how do I find answers to these kinds of questions? I've searched a few websites..but haven't found what I needed - what are some good resources to turn to? Any thoughts?
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Best resource is the API.

http://java.sun.com/j2se/1.4.2/docs/api/

Try looking at the System class and specifically the getProperties method. Not sure but it might have what you need.
 
Tina Long
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you! as soon as I posted my question - I found some code another person on my team wrote - and he did use System.getProperties - and this is what I need - I just now need to know what information I can grab - and it looks like I can figure that out from that website...so thanks!
 
Tina Long
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I was pre-mature again - I got too excited that things actually worked!!! However the system properties didn't give me all the information I need....are there any other classes that can be used to retreive user settings?
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tina,

What user settings are looking to get access to?

Regards,
JD
 
Tina Long
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to find out if they have their browser set to accept cookies, pop-ups..etc and I can't use java script and I need to know if they have a particular application installed on their machine - like Word, Excel etc.

It just seems like there should be a way to get to this information
 
John Dell'Oso
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tina,

This seems like a servlet/JSP related question. I suspect that you're question is related to a web application. Am I right in assuming this?

Regards,
JD
[ March 24, 2005: Message edited by: John Dell'Oso ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[posted before John Dell'Oso'd comment had appeared]

There is. But by far the easiest way is to prompt the user to tell you, or docuement that these are dependencies for your program. The alternative would something like traversing the Registry looking for installed programs (which Java can't do directly, so you'd need to use JNI plus some native code).

[posted after John Dell'Oso's comment]
If John is right and this is a web app, then forget the JNI route. The best route for this is to either code assuming these features don't exist, or document that they are required to use your app.
[ March 24, 2005: Message edited by: Paul Sturrock ]
 
Tina Long
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well..partly...

The browser part - yes - that's for a web application - which I shouldn't have asked in this forum...I apologize for asking here...

The other part - detecting what is installed on their machine is for something else. I need to ensure that they have excel and word on their machine before they can do certain things in my application. I thought that it was stored somewhere on the machine what was on it - without having to go to the actual program files directory - I could be very wrong though...
 
Tina Long
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what do you mean "traversing the Registry"? does that mean search it?

I'm not sure what JNI is - I guess that means I have more learning to do!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic