在我的计算机上安装java之后,我在netbeans中遇到了以下错误
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project Project1: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles:[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
运行以下代码之后
public class Class1 {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("What is your name?");
String name = scan.nextLine();
System.out.println("Your name is " + name);
}
}
如果我只负责 System.out.println("What is your name?");
一行代码,程序运行完美。
我在这个网站的多个帖子中发现了相同(或类似)的错误,但我对编程太陌生了,我不明白答案。例如,在这篇文章中,投票最多的回答是“事实证明,我运行了mvn clean package install。正确的方法是mvn clean install”,他在评论中说“我在命令行中运行了这个命令。我记得,eclipse允许创建构建任务。”
我一直在试图找出一些答案的含义,但没有取得多大成功。有人能向初学者解释如何解决这个问题吗?
暂无答案!
目前还没有任何答案,快来回答吧!