• 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 to monitor softwares in Java

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any class in Java to identify the status of the software installation.

I need to check whether a particular software is installed in the system.How can I do this in Java

Please can any one help me out to find the solution for this pbm.



Regards,
Vidhya
[ December 04, 2006: Message edited by: Vid Srini ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The software would install particular files somewhere - if you know what those are you can check for their presence. Not foolproof, but should be pretty reliable. This won't work in situations where a SecurityManager is present (applets, possibly web apps depending on the servlet container setup), because permission to access arbitrary files won't be given.
 
Vid Srini
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf,
Thanks for your reply.

Is there any specific class in Java to do this checking...

Can I get a detailed input of how to proceed.

Thanks,
Vidhya
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The File class has a method (exists) that tells you whether a file actually exists
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This would seem highly unreliable to me, I rarely install things in the default location on Windows as "Program Files" is too long and has a space. If you are calling a third party application I would ask the user where its is installed and if you can't find the program there, give the user an warning/error as the case may be.
[ December 05, 2006: Message edited by: Tim LeMaster ]
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
whenever some software installs on windows operating system it adds some information in the windows registry...So the first thing you need to know which registry entries a particular software adds to the windows registry.
than you can easily read information from windows registry using java.util.prefs.Preferences class
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't see anything in the question that indicates that a Windows-only solution like reading the registry will suffice. But anyway, the Preferences class can not read arbitrary registry entries, only a very limited subset of entries generated by other applications also using this class. For a way of reading all registry entries, [URL=How to read the Windows Registry]look here[/url].
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic