Maven

时间:2017-06-06 05:46:59

标签: java spring windows maven

我使用Spring Boot,PostgreSQL,Maven作为后端和Angular 2作为前端制作了一个简单的Web应用程序。使用maven运行后端时,我收到错误,如

  

[错误]无法执行目标org.springframework.boot:spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT:在项目后端运行(default-cli):无法执行java:无法运行程序" C:\ Program Files \ Java \ jdk1.8.0_131 \ jre \ bin \ java.exe":CreateProcess error = 206,文件名或扩展名太长 - > [帮助1]   org.apache.maven.lifecycle.LifecycleExecutionException:无法执行目标org.springframework.boot:spring-boot-maven-plugin:2.0.0.BUILD-SNAPSHOT:在项目后端运行(default-cli):无法执行java           在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)           在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)           在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)           在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)           在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)           在org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)           在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)           在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)           在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)           在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)           在org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)           在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)           在org.apache.maven.cli.MavenCli.main(MavenCli.java:191)           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)           at java.lang.reflect.Method.invoke(Method.java:498)           在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)           在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)           在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)           在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)   引起:org.apache.maven.plugin.MojoExecutionException:无法执行java   **

请告诉我这是否有任何解决办法。我甚至试过改变Java类路径。这是在类似的问题中提出的。请让我知道是否有人有任何想法来解决它。

我浏览了这个链接" CreateProcess error=206, The filename or extension is too long when running main() method"它与它不相似,因为我使用的是Maven和SpringBoot,我也尝试通过更改类路径来修复它。我清理,使用maven安装,并且在构建时没有错误,当我尝试运行" mvn spring-boot:run -Drun.profiles = h2database-file "这个命令我收到以下错误。

0 个答案:

没有答案