• 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

howto get versions of local installed browsers

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi *,

i need to get the versions of the localy installed ie, firefox, opera and chrome. How can i do this with java?
I'm running windows.

Yours

Roland
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you can with Java. But with Javascript you can.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the context of a web app, only a signed applet would be able to do this, because you'd need to have access to the local file system.

Or are you asking about a desktop app?
 
Roland Schmit
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm talking about a "stand alone" Java programm running on my desktop, which should querry the browser versions installed on the same machine.

Roland
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't use Java. I'd use a UNIX script (for Linux and Mac) and a PowerShell or batch script (for Windows.) I'd have that script do a "find" for the install path of those programs and then issue a command line version command.

Or if you can assume the default locations are used, just skip to a version command. Presuming the browsers have a command like flag to get the version of course; that'd be the first thing to check.

There's nothing to stop you from doing the same in Java - route everything through Runtime.exec(), but the logic would still be done at the operating system level.
 
Roland Schmit
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, i'll see ...
 
Ranch Hand
Posts: 296
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roland Schmit wrote:
i need to get the versions of the localy installed ie, firefox, opera and chrome.


K. Tsang wrote:I don't think you can with Java. But with Javascript you can.


Could you please show us how to know which versions of ie, firefox, opera and chrome installed from Javascript, without starting each of them?
 
surlac surlacovich
Ranch Hand
Posts: 296
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:I'd use a UNIX script (for Linux and Mac) and a PowerShell or batch script (for Windows.)


I like the idea. Also you can use Jawin and access Windows registry to get installed apps.
 
Roland Schmit
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi;

with the hint from Jeanne, and some googling, i now have folowing:

wich works as i expect. The last problem i have, which are the registry keys to query the chrome and opera version?

Roland
 
You got style baby! More than this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic