03-29-2012 02:40 PM
After installing QTP 10.0 on an XP virtual machine, java virtual machine cannot be launched and app will not open. Here are more details: Appropriate version of Java installed on virtual machine (appropriate for app to be tested) and application launches correctly from a webstart page prior to installation of QTP. Install QTP 10.0 on virtual machine, then when attempt to launch the application to be tested, receive error that "cannot launch java virtual machine" so the application will not launch. Interestingly enough after install QTP, if attempt to access the Java Control Panel on virtial machine (from Start, Control panel) it will not open. Once uninstall QTP and remove all regedit keys, the desired app launches successfully and Java Control Panel is accessible again by user.
Anyone guidance to offer is very much appreciated.
Solved! Go to Solution.
03-29-2012 10:43 PM
I've had something similar, when I installed QTP with the Java addin it installed an older version of Java. When I tried to use my app a button which was a Java applet became disabled.
When I looked at the Java Runtime Environments tab I saw 2 versions of Java, the older version installed by QTP had become checked as the default, I unchecked it and both the app and QTP functioned correctly.
I realise you cannot access the Java control panel but I just wanted to say I think the 2-versions of Java scenario is your issue.
04-03-2012 12:45 PM
Can you check for the user defined and System environment variables? from right click on my computer -Properties->System Properties->Advanced -Environment Variables. Look for _JAVA_OPTIONS, JAVA_TOOL_OPTIONS etc which have QTP java classes path, remove them. And try. May be you can copy those and keep a back up and add back if this does not solve.
Once i had this issue, I cleared up these and then i was able to launch my java application and also QTP. I was not interested to know what went wrong. So i did not bother about it.
Please let me know if you figure out something.
04-04-2012 06:09 AM
Thank you for the response. After uninstalling QTP, I checked the Java Runtime Environments tab and found there was an older version of java installed. I uninstalled that version and then installed QTP again, however I did not install the Java Add-In and then could launch my java application. If java add-in gets installed then the Java control panel becomes disabled, so it has something to do with the java add-in. Thanks for the idea though.
04-04-2012 07:39 AM
Success! After installing the Java Add-in, I checked environment variables as suggested. I copied the value and pasted it to a word document as a backup for the following environment variables then deleted them and my java app launched successfully. Envrionment variables deleted are:
Thanks so much for the solution.