Skip to content

在安装java@8.0.342+7后,java报错问题 #20

@watersupis

Description

@watersupis

vfox i java@8.0.342+7后想看下是否安装成功,然后出现了下面的错误

C:\Users\ADMIN>java
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

然后我看了下环境变量,path加了 G:\java\current,然后我在此目录下运行java不能直接运行

G:\java\current>java
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

然后到安装目录下运行是可以

G:\java\v-8.0.342+7\java-8.0.342+7\bin>java
用法: java [-options] class [args...]
           (执行类)
   或  java [-options] -jar jarfile [args...]
           (执行 jar 文件)
其中选项包括:
    -d32          使用 32 位数据模型 (如果可用)
    -d64          使用 64 位数据模型 (如果可用)
    -server       选择 "server" VM
                  默认 VM 是 server.

目前我的解决方法只能在path将 G:\java\current 改为 %JAVA_HOME%\bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions