Check out these issues: https://issues.apache.org/jira/browse/NETBEANS-3251 and https://issues.apache.org/jira/browse/NETBEANS-3253

It has been solved for 11.2, but the solution in NETBEANS-3253 can be applied on earlier versions.

On 10/23/19 2:14 PM, Richard Grin wrote:

Is this problem known? https://stackoverflow.com/questions/58411279/java-with-maven-wouldnt-build-cannot-run-program-cmd-malformed-argument-has

Is there a recommended workaround? Is it really a problem with the JDK version?

The error message when a project of type Maven - Web application is created: Cannot run program "cmd" (in directory "C:\Users\admin\Documents\NetBeansProjects"): Malformed argument has embedded quote:....

Some of my students have this problem with the JDK 11.0.5.

On my computer, no problem with

*Product Version:* Apache NetBeans IDE 11.1

*Java:* 12; OpenJDK 64-Bit Server VM 12+33

*Runtime:* OpenJDK Runtime Environment 12+33

The command on my computer (perhaps the problem comes from the part in bold type?):

cd C:\Users\grin\Documents\Projets NetBeans pour TPs Java EE; JAVA_HOME=C:\\autresprogrammes\\java\\jdk-11 cmd /c "\"\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven\\bin\\mvn.cmd\" -DarchetypeGroupId=io.github.juneau001 -DarchetypeArtifactId=webapp-javaee8 -DarchetypeVersion=1.3 -DarchetypeRepository=https://repo.maven.apache.org/maven2 -DgroupId=fr.uns.grin -DartifactId=mavenproject1 -Dversion=1.0-SNAPSHOT -Dpackage=fr.uns.grin.mavenproject1 *-Dbasedir=\"C:\\Users\\grin\\Documents\\Projets NetBeans pour TPs Java EE\" * -Darchetype.interactive=false *-Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\"* --batch-mode org.apache.maven.plugins:maven-archetype-plugin:2.4:generate*\""*

The complete error message on a student's computer:

Cannot run program "cmd" (in directory "C:\Users\admin\Documents\NetBeansProjects"): Malformed argument has embedded quote: "F:\Program Files (x86)\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd" -DarchetypeGroupId=io.github.juneau001 -DarchetypeArtifactId=webapp-javaee8 -DarchetypeVersion=1.3 -DarchetypeRepository=https://repo.maven.apache.org/maven2 -DgroupId=com.mycompany -DartifactId=mavenproject1 -Dversion=1.0-SNAPSHOT -Dpackage=com.mycompany.mavenproject1 *-Dbasedir=C:\Users\admin\Documents\NetBeansProjects* -Darchetype.interactive=false *-Dmaven.ext.class.path="F:\Program Files (x86)\NetBeans-11.1\netbeans\java\maven-nblib\netbeans-eventspy.jar"* --batch-mode org.apache.maven.plugins:maven-archetype-plugin:2.4:generate

Reply via email to