UFT/QTP sees Java application as Window?

  • Questions
  • UFT/QTP sees Java application as Window?
Question ID: 107230
1
0

Odd one here…on some of our client machines, UFT can’t recognize our Java app as anything other than a Window…pretty sure the version of Java should be compatible…how can I get Object Spy to correctly recognize it as a javawindow??

Marked as spam
Posted by (Questions: 424, Answers: 91)
Asked on October 30, 2016 10:50 pm
227 views
Answers (1)
1
Private answer

This is most likely due to a conflict with your Java application and UFT's Java support due to UFT creating the _JAVA_OPTIONS environment variable upon installation of the Java Add-in.

Launch your Java app using options ''-Xrunmicsupp'' & ''-Xbootclasspath'' to the command line to load Java support (without using the environment variables).

java -Xrunjvmhook -Xbootclasspath/a:
By default, is ''binjava_sharedclasses;binJAVA_S~1classesjasmine.jar''

Default for UFT:

''C:Program Files (x86)HPUnified Functional Testingbinjava_sharedclasses'';''C:Program Files (x86)HPUnified Functional Testingbinjava_sharedclassesjasmine.jar''

e.g.,

java -Xrunjvmhook -Xbootclasspath/a:C:PROGRA~1HPQUICKT~1binJAVA_S~1classes;C:PROGRA~1HPQUICKT~1binJAVA_S~1classesjasmine.jar -jar C:SwingSet2SwingSet2SwingSet2.jar

To make it easy, you can create a .bat file for launching. Hope this helps!

Marked as spam
Posted by (Questions: 0, Answers: 771)
Answered on October 30, 2016 11:02 pm
Thanks a bunch! Followed your suggestion to throw all of that in a .bat file to launch...works great! UFT can now properly recognize my app!
( at October 30, 2016 11:03 pm)
Can anyone help how to prepare. Bat file for the issue
( at October 11, 2022 12:29 pm)
EyeOnTesting