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??
Answer by RickJames · Oct 30, 2016 at 11:02 PM
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:<mic_classes> <ApplicationClass> By default, <mic_classes> is "<UFT/QTP>\bin\java_shared\classes;<UFT/QTP>\bin\JAVA_S~1\classes\jasmine.jar"
Default for UFT:
"C:\Program Files (x86)\HP\Unified Functional Testing\bin\java_shared\classes";"C:\Program Files (x86)\HP\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
java -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar –jar C:\SwingSet2\SwingSet2\SwingSet2.jar
To make it easy, you can create a .bat file for launching. Hope this helps!
QTP Object learning issue 1 Answer