Java with maven wouldn't build: Cannot run program “cmd” “Malformed argument has embedded quote”

前端 未结 10 2079
花落未央
花落未央 2020-12-01 06:29

I\'ve a fresh install of netbean 11.1. Now I\'m trying to build a project but I get the following error output:

Cannot run program \"cmd\" (in direc

10条回答
  •  佛祖请我去吃肉
    2020-12-01 06:52

    Although this problem can be fixed by installing jdk1.8.0_221, but actually you don't need to downgrade your JDK. Just try these:

    1. First exit netbeans IDE if it's open, then open netbeans configuration file from here: netbeans-Install-Dir/etc/netbeans.conf (Note: for me netbeans-Install-Dir is C:\Program Files\NetBeans 8.2\etc)
    2. Add the below arguments
    -J-Djdk.lang.Process.allowAmbiguousCommands=true
    
    1. to the beginning of the string that you find at this line:
    netbeans_default_options="-J-client -J-Xss2m -J-Xms32m ......."
    

    Sample screenshot as shown below:
    4. Save the change and start your netbeans IDE.

提交回复
热议问题