Gradle Integration for Eclipse daemon startup fail

2019-06-12 16:41发布

问题:

I am new to Eclipse Juno using the Gradle Integration for Eclipse plugin. I am at a loss why gradle works perfectly from the command line and as an external tool; but in Eclipse Juno Package Explorer menu: gradle task it fails constantly with the following stack trace:

Error while initializing classpath container Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.5/userguide/gradle_daemon.html

Please read below process output to find out more:

java.lang.IllegalArgumentException: URI has an authority component at java.io.File.(File.java:423) at org.gradle.api.internal.classpath.EffectiveClassPath.findAvailableClasspathFiles(EffectiveClassPath.java:41) at org.gradle.api.internal.classpath.EffectiveClassPath.(EffectiveClassPath.java:32) at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:61) at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:55) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:41) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) at org.gradle.launcher.daemon.bootstrap.GradleDaemon.main(GradleDaemon.java:22)

Could not fetch model of type 'EclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'.

The env variables for GRADLE_HOME, GRADLE_USER_HOME, PATH are all setup correctly. From the command line gradle -v returns:


Gradle 1.6

Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC Groovy: 1.8.6 Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012 Ivy: 2.2.0 JVM: 1.7.0_45 (Oracle Corporation 24.45-b08) OS: Windows 7 6.1 amd64

Eclipse version:

Eclipse Java EE IDE for Web Developers.

Version: Juno Service Release 2

Build id: 20130225-0426

OS is Win7 64 on amd64 platform with 4GB of system memory so it show not be a memory issue and there are no gradle daemons running when I get the above stack trace in Eclipse Juno.

I have exhausted all means on the web, this site, and my team to resolve the issue. I need some help please.

回答1:

Windows 7 sets the user.home as a UNC path. Add -Duser.home=x:\ to your Eclipse INI file where "x" is a local drive name. That should solve your problem



回答2:

If you are using the Gradle plugin, ensure it is pointing to the correct Gradle installation. I get the error you show when I use the embedded Gradle that comes with Spring Tools Suite.