在命令行DOS下运行java类,出现了如下的错误信息:
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.4', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
解决办法:
进入注册表:找到HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment 得知 CurrentVersion=1.4。后来我手动将CurrentVersion的值有原先的1.4改为1.6,因为我环境变量中path的值对应的是jdk1.6的路径。从新运行了一遍java类,运行OK!
阅读(3458) | 评论(0) | 转发(0) |