无法执行Java命令。访问被拒绝。 (0x5的)

时间:2022-09-01 21:48:10

While starting StartSonar.bat I am getting the below error, I added wrapper.java.command=C:/Program Files/Java/jdk1.8.0_121/bin in wrapper.config file.

在启动StartSonar.bat时遇到以下错误,我在wrapper.config文件中添加了wrapper.java.command = C:/ Program Files / Java / jdk1.8.0_121 / bin。

Critical error: wait for JVM process failed
--> Wrapper Started as Console
Launching a JVM...
Unable to execute Java command.  Access is denied. (0x5)

Advice:
Access denied errors when attempting to launch the Java process are
usually caused by strict access permissions assigned to the directory
in which Java is installed.

1 个解决方案

#1


3  

A quick google search would let you figure out the issue easily.

快速谷歌搜索可以让你轻松找出问题。

Your wrapper config is almost correct. Open the file and edit the wrapper.java.command configuration key to:

您的包装器配置几乎是正确的。打开文件并编辑wrapper.java.command配置键以:

# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
wrapper.java.command=C:\Program Files\Java\jdk1.8.0_121\bin\java
#wrapper.java.command=java

As you can see, you are missing \java in your path.

如您所见,您在路径中缺少\ java。

Hope this helps! Cheers and happy coding.

希望这可以帮助!干杯和快乐的编码。

#1


3  

A quick google search would let you figure out the issue easily.

快速谷歌搜索可以让你轻松找出问题。

Your wrapper config is almost correct. Open the file and edit the wrapper.java.command configuration key to:

您的包装器配置几乎是正确的。打开文件并编辑wrapper.java.command配置键以:

# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
wrapper.java.command=C:\Program Files\Java\jdk1.8.0_121\bin\java
#wrapper.java.command=java

As you can see, you are missing \java in your path.

如您所见,您在路径中缺少\ java。

Hope this helps! Cheers and happy coding.

希望这可以帮助!干杯和快乐的编码。