(1)直接在环境变量中删除配置的相关路径
path的值:
C:\Documents and Settings\Administrator>path
PATH=C:\Documents and Settings\All Users\Application Data\Oracle\Java\javapath;D:\oracle\product\10.
删除配置的Oracle变量,如下所示:
C:\Documents and Settings\All Users\Application Data\Oracle\Java\javapath;
(2)执行java -version命令后报错
按提示更改注册表的相关键值:
重新打开一个cmd,执行java -version,命令正常执行: