Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I find out the version number of the Flash player installed on my system in Java?

I currently run OS X, but the solution should be OS-agnostic.

share|improve this question
Javascript is run in the browser that displays the website. It'll read the script and evaluate it line by line. You can't do that from Java, at least not run it in the context of that website. Can you please elaborate on what you're really doing? Why would you need to get the version number in Java? I just think you're approaching this the wrong way. – slhck Jun 13 '12 at 20:47
I just need to get the version number of the flash player. I could not think of another way to do it using only java. – Kevin Doherty Jun 13 '12 at 20:49
Well, that depends on which operating system you're on. Does the question make more sense to you now? – slhck Jun 13 '12 at 20:51
Im using a mac but the program should run regardless of the OS – Kevin Doherty Jun 13 '12 at 20:52
Do you have the XY problem? – ChimneyImp Jun 13 '12 at 20:55
up vote 2 down vote accepted

You can try to read the plug-in's configuration/helper files. This depends on where they're stored on each OS.


For the system-wide Flash, read the following XML file:

/Library/Internet Plug-Ins/Flash Player.plugin/Contents/version.plist 

The version number is the text value of the first occurrence of <string> in the <dict> element. For example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Google Chrome on the other hand ships with its own version of Flash, to be found here:

/Applications/Google Chrome Framework.framework/Internet Plug-Ins/Flash Player Plugin for Chrome.plugin/Contents/Info.plist

Replace 21.0.1171.0 with the newest folder you can find in there. In the Info.plist, look for the first <string> child following the <key> with CFBundleShortVersionString as its text:

share|improve this answer
If anybody knows where to find this in Windows or Linux, go ahead. – slhck Jun 13 '12 at 20:58
Does this work if all they have installed is the latest version of Chrome? I know Chrome ships with Flash internally, but I don't know if it registers it in the usual places. – Darth Android Jun 13 '12 at 21:11
Ah, of course. It's buried within the application bundle. I added that to my answer. – slhck Jun 13 '12 at 21:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .