user760613
user760613

Reputation:

Couldn't find java while intellij idea building project

I used to have intellij Idea 14.1 with java 1.8 with update 40. I had to uninstall the update and come back to java 1.8 with update 31. Later on I uninstalled java completely and installed java 1.7 update 79.

Now while build a gradle project in Idea IDE I am facing this problem : Error:Cannot run program "C:\Program Files\Java\jdk1.8.0_31\bin\java" (in directory "C:\Users\Krishna\.IdeaIC14\system\compile-server"): CreateProcess error=2, The system cannot find the file specified

I am not able to point out where is the reference to java 1.8.31 left in the project. Could you help me?

Upvotes: 2

Views: 534

Answers (2)

Johan Pretorius
Johan Pretorius

Reputation: 103

Intellij uses the default JDK in project structure.

You must still have JDK 1.8.0_31 as the default, but not installed.

Upvotes: 1

user760613
user760613

Reputation:

I just updated the project properties with my version of java. And it worked. Not sure why it did not when I did the same before.

Upvotes: 1

Related Questions