Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在安装[email protected]+7后,java报错问题 #20

Open
DTer1999 opened this issue Jun 11, 2024 · 1 comment
Open

在安装[email protected]+7后,java报错问题 #20

DTer1999 opened this issue Jun 11, 2024 · 1 comment

Comments

@DTer1999
Copy link

vfox i [email protected]+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

@faeli
Copy link

faeli commented Jun 29, 2024

image

环境变量如下:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants