简体   繁体   中英

Cannot run program "C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" Malformed argument has embedded quote: -Djava.endorsed.dirs=

ERROR: Cannot run program "C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" (in directory "C:\Users\USERNAME\AppData\Local\JetBrains\IntelliJIdea2020.3\compile-server"): Malformed argument has embedded quote: -Djava.endorsed.dirs=

I keep getting this error everytime I Redeploy my Spring Boot project via weblogic server in IntelliJ IDE. The first time I deploy, everything works just fine. But when I Redeploy the project in order to effect new changes, this error comes up.

My Tools:

  1. IntelliJ IDEA 2020.3 (Ultimate Edition)
  2. WebLogic Server Version: 12.2.1.3.0
  3. Windows 10
  4. Java (JDK) version "1.8.0_202"
  5. Java(TM) SE Runtime Environment (build 1.8.0_202-b08)

What I have Tried:

  1. I only have one installed JDK and JRE version: 1.8.0_202 installed on my PC
  2. Deleted javaws.exe, javaw.exe & java.exe fields from my Sys32 Folder (A Googled Solution)
  3. Able to view my Java version on cmd when I run: java -version
  4. Path to my jdk is correct: C:\Program Files\Java\jdk1.8.0_202\bin\java.exe
  5. IntelliJ is correctly pointing to my JDK folder JDK Linked to My IntelliJ IDE
  6. My Weblogic configurations look just fine: My Weblogic configurations

I also encountered the same problem. The reason is that I installed the FindBugs plugin. You can try to add the following line of parameters to the idea64.exe.vmoptions.

-Djdk.lang.Process.allowAmbiguousCommands=true

For those that need help finding the VM options in the IDE. I'm using IntelliJ IDEA 2021.1 by the way.

On the IDE Toolbar at the top -> click HELP -> Edit Custom VM Options...

Then add this VM option at the bottom (uncluding the hyphen '-' symbol):

-Djdk.lang.Process.allowAmbiguousCommands=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM