2

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.

3
  • 1
    I believe this was the 1000th question on SQA.
    – user246
    Nov 13, 2012 at 16:36
  • :-) nice statistics
    – dzieciou
    Nov 13, 2012 at 18:50
  • I should get a badge for being 1000th! :-)
    – SheyMouse
    Nov 20, 2012 at 15:11

2 Answers 2

2

I Googled for "agentlib:jvmhook". The first link 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.

1
  • 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, 2012 at 16:02
2
  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!!

1
  • I want to thanks "user5283" as his steps helped me to initiate Netbeans again after being stuck for a long time.
    – user5610
    Jul 10, 2013 at 18:32

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