Re: QTP Problem on VMWare and Java Application (518 Views)
Reply
Occasional Contributor
DanielLopes
Posts: 3
Registered: ‎11-30-2012
Message 1 of 4 (639 Views)

QTP Problem on VMWare and Java Application

Hello.

 

I have QTP intalled on a vmware enviroment wich I use to automate a Java applicatino.

 

The issue is that, on vm restart the VMWare agent fails to load due to this enviroment variables.

 

'_JAVA_OPTIONS'
'JAVA_TOOL_OPTIONS'
 
This si a known issue on vmware community:
 
 
but the problem is:
 
Once I remove this 2 enviroment variables, VMWare client works again, but none of my java applications work and qtp cannot recognize any java object on my tests.
 
Anyone can help me. Thank you.
 
 
 
Occasional Visitor
Raymond Collins
Posts: 1
Registered: ‎06-16-2010
Message 2 of 4 (554 Views)

Re: QTP Problem on VMWare and Java Application

Did you ever get a resolution to this issue. we are facing the same.

HP Expert
Ana_Noncheva
Posts: 245
Registered: ‎08-06-2013
Message 3 of 4 (522 Views)

Re: QTP Problem on VMWare and Java Application

Hello,

 

There is a way to load java support without creating the _JAVA_OPTIONS environment variable:

 

Launch the Java application from the command line using commands that will load Java support.

 

Add the -Xrunmicsupp and the -Xbootclasspath options to the application's command line.

 

To configure a Java application with java.exe, the following command line should be used:

   java -Xrunmicsupp -Xbootclasspath/a:<mic_classes> <ApplicationClass>

 

QuickTest Professional 9.5 and above: By default, <mic_classes> is "C:\Program Files\HP\QuickTest Professional\bin\java_shared\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar"

Example: java -Xrunmicsupp -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 D:\JDKs\jdk1.3.1_01\demo\jfc\Notepad\Notepad.jar

 

You can also create a batch file containing the command line and launch your application via the batch file.

 

Is it applicable in this case?

 

Regards,

Ana

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
HP Expert
Ana_Noncheva
Posts: 245
Registered: ‎08-06-2013
Message 4 of 4 (518 Views)

Re: QTP Problem on VMWare and Java Application

Hello,

 

There is also another approach you can try, besides the above:

 

This will ensure that the Java support is only loaded when Java / Oracle addin are loade
  1. Close QTP / UFT / Sprinter and any Java or Oracle related applications.    Note: steps 2 to 6 are for Web related applications of the Java/Oracle type (mostly Applets) 
  2. Navigate to the Java control panel.
  3. Start -> Control panel -> Java control panel
  4. Under the Java Advanced tab navigate to "<APPLET > tab support" (for Java 1.5.x) or "Default Java plugin for browsers" (for Java 1.6.x).   Note: For Vista or later operating systems, it appears this option may be disabled) 
  5. Please uncheck the checkbox "Internet Explorer"
  6. Click "Ok" and continue until Java Control Panel is closed 
  7. Navigate to the following registry key: 32bit Operating System HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\JavaAgent\LoadDependsOnPackage 64bit Operating System HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercury Interactive\JavaAgent\LoadDependsOnPackage
  8. Modify the value from  “0” to "1". The default value is 0 which indicates that the agent is always loaded into an application. If this value is then changed to 1, it will instruct the agents to only be injected when the Java / Oracle addin is loaded.

For changes to take effect, please restart the machine

 

Please also check following ER: http://support.openview.hp.com/selfsolve/document/LID/QCCR1J20779 

 

Regards,

Ana

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.