Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ->

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
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 '14 at 7:48
up vote 2 down vote accepted

I Googled for "agentlib:jvmhook". The first link ( 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:". 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
I also found that removing JAVA_TOOL_OPTIONS works. Essentially I found this forum post [link]( 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
  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

protected by Community Jan 2 '14 at 18:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

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.