Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding acrobat reader component thru JAVA  RSS feed

 
srinivasrao marri
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Can anyone say how to find that the acrobat reader component has been installed in a computer or not? this should be done thru a java/jsp program. I am using windows 2000 professional operating system. If is there any plug-in or classes availble?? please let me know.
Thank you
 
Michael Zalewski
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you mean from the server, I don't think there is any good way to do this. The server will only see a request, and cannot cause anything to run on the client which could detect the version of Acrobat.
You might get somewhere with a servlet. But even a servlet cannot normally see anything outside of the web page in which it is embedded.
Your best bet is to use an Active-X control (which you can only write in J++). There might be a clever way of scripting an <object> tag which has the CLSID for the version of Acrobat you want. You would then use VbScript or even JavaScript to query the object, and you get null if the version of Acrobat is not installed. (And the <object> tag would be ignored in Netscape 4.7 or from a Unix workstation).
Another possibility is to download a Java Application which can do this detection. To detect the version of Acrobat you can either 1) Hunt for its executable or 2) Examine the Windows registry. But either one of these options is not attractive in Java. The first one involves scanning the user's hard disk, which will take a long time, and probably would cause concern to users which did not completely trust your application. The second one involves accessing the Windows registry, which is not available to most Java JVMs, but might be available in 1.5 (I think?)
 
srinivasrao marri
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for giving reply Michael,
i got an idea like if i write a program in C language, where i have functions to get the windows registry info. And i will make use of C program in java thru JNI.
Please suggest your comments on this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!