Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I am attempting to run the Selenium server for the first time on my machine and am receiving an error when running the jar, or when attempting to find the java version. Here is the error:

C:\selenium-2.25.0> java -jar .\selenium-server-standalone-2.25.0.jar
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook ->
Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar

Error occurred during initialization of VM. I could not find agent library jvmhook on the library path, with error: %1 is not a valid Win32 application.

I have both JDK6 and 7 installed. I installed 7 to see if that would fix it.

I have QTP on my machine as well. Could this be the reason for the issue?

Any help would be greatly appreciated.

share|improve this question
1  
I believe this was the 1000th question on SQA. –  user246 Nov 13 '12 at 16:36
    
:-) nice statistics –  dzieciou Nov 13 '12 at 18:50
    
I should get a badge for being 1000th! :-) –  SheyMouse Nov 20 '12 at 15:11
    
Thanks a lot. its working fine –  user6643 Jan 2 at 7:48
add comment

2 Answers 2

up vote 2 down vote accepted

I Googled for "agentlib:jvmhook". The first link (http://www.learnqtp.com/forums/Thread-Could-not-create-Java-virtual-machine) suggests that your problem may be related to having installed QTP. Someone in that forum said, "There is a document from HP about how to fix your issue: http://support.openview.hp.com/selfsolve...t/KM543247". I am unable to access that link, but perhaps you are.

I do not believe you need to set -agentlib:jvmhook in order to use Selenium. You might try removing it from your JAVA_TOOL_OPTIONS.

share|improve this answer
1  
I also found that removing JAVA_TOOL_OPTIONS works. Essentially I found this forum post [link](tinyurl.com/c2wraj7 which ) instructing the removal of the following: _JAVA_OPTIONS, JAVA_TOOL_OPTIONS, and IBM_JAVA_OPTIONS This solution worked. –  SheyMouse Nov 13 '12 at 16:02
add comment
  1. go to Computer>Properties>Advanced system settings
  2. From Advanced tab choose Environment Variables
  3. From System Variables delete JAVA_OPTIONS, JAVA_TOOL_OPTION and IBM_JAVA_OPTIONS
  4. Re-Run Application. Works for me while trying to run JMeter

On 6/5/2014: Just to add- if the same environment variables exist in User variables list then delete them as well Caution: Keep a backup of those variables just in case you need them again in the future. This resolved issues on multiple applications in my case: Javac at the command prompt,Eclipse IDE,SQLDeveloper---BIG THanks to the above solution provider!!

share|improve this answer
    
I want to thanks "user5283" as his steps helped me to initiate Netbeans again after being stuck for a long time. –  user5610 Jul 10 '13 at 18:32
add comment

protected by Community Jan 2 at 18:53

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.