感谢文章作者:http://blog.csdn.net/hbsong75/article/details/39736291
今天打算用JMeter测试一下tomcat并发性能,下载安装后执行 bin\JMeter.bat,报 “Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'”错误,从本机环境来看,JAVA是装了的,而且还有几个版本,Eclipse等也能编译java程序,怎么就不能运行JMeter呢?
后来经过反复尝试,可能是多个JAVA版本造成了冲突,把其中一个版本的可执行路径加到PATH环境变量最前面解决问题:
C:\>echo %PATH%
C:\Program Files\Java\jdk1.7.0_07\bin;C:\Program Files (x86)\AMD APP\bin\x86_64;
C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows
\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Inte
l\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files
(x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\
Program Files\TortoiseGit\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\
Common Files\Intel\WirelessCommon\;C:\apache-maven-2.2.1\bin;C:\Program Files (x
86)\IDM Computer Solutions\UltraEdit\;C:\Program Files (x86)\IDM Computer Soluti
ons\UltraCompare\;C:\Python26