1
package com.mycompany.mavenproject1;

public class MainClass {
     public static void main(String[] args) {
        System.out.println("HELLO WOLRD!");
    }
}

*I am using Netbeans 8.2 RC and JDK_8.251_Windows_x32. I am running windows 7 32 bit operating system. I need help in this regard. Even I have installed all the plugins for Maven project.

Following error is being shown when I run the project:

cd C:\Users\Asim\Documents\NetBeansProjects\mavenproject1; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_251" cmd /c "\"\"C:\\Program Files\\NetBeans 8.2 RC\\java\\maven\\bin\\mvn.bat\" -Dexec.args=\"-classpath %classpath com.mycompany.mavenproject1.MainClass\" -Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_251\\bin\\java.exe\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2 RC\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec\""
Cannot run program "cmd" (in directory "C:\Users\Asim\Documents\NetBeansProjects\mavenproject1"): Malformed argument has embedded quote: "C:\Program Files\NetBeans 8.2 RC\java\maven\bin\mvn.bat" -Dexec.args="-classpath %classpath com.mycompany.mavenproject1.MainClass" -Dexec.executable="C:\Program Files\Java\jdk1.8.0_251\bin\java.exe" -Dmaven.ext.class.path="C:\Program Files\NetBeans 8.2 RC\java\maven-nblib\netbeans-eventspy.jar" -Dfile.encoding=UTF-8 process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
nehacharya
  • 925
  • 1
  • 11
  • 31
Asim Imdad
  • 11
  • 2

1 Answers1

0

Open etc folder of NETBEANS (C:\Program Files\NetBeans 8.2\etc) and there you would be able to see three files netbeans.clusters, netbeans.conf, netbeans.import.

There open netbeans.conf then Append -J-Djdk.lang.Process.allowAmbiguousCommands=true under netbeans_default_options key

For Example : when you will open that file then under netbeans_default_options you will get this value : netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true"

After appending this would be : netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Djdk.lang.Process.allowAmbiguousCommands=true"

TT.
  • 15,774
  • 6
  • 47
  • 88
Prakash
  • 11
  • 1
  • 1