I have been trying to get Gradle working in intellij 10.5 so I can run some sample projects that were not in Maven. So I installed the Gradle plugin, even though IDEA supports Gradle for editing, I wanted a way to run Gradle tasks in the IDE.

However when I ran the plugin, I was getting this failure in the Gradle console:

Executing command: "tasks" Failed to connect to gradle process for command 'tasks'

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\JetBrains\IntelliJ IDEA 10.5\jre

Please set the JAVA_HOME variable in your environment to match the location of your Java installation.

I did see this posting
http://stackoverflow.com/questions/5124368/gradle-doesnt-work-in-intellij-problems-with-java-home

I then created a new environment variable called IDEA_JDK to point to %JAVA_HOME% and restarted Intellij and Gradle plugin works great.

Mick Knutson

Java, JavaEE, J2EE, WebLogic, WebSphere, JBoss, Tomcat, Oracle, Spring, Maven, Architecture, Design, Mentoring, Instructor and Agile Consulting. http://www.baselogic.com/blog/resume

View all posts

Java / JavaEE / Spring Boot Channel

BLiNC Supporters

BLiNC Adsense

Archives

Newsletter