Joshua Crocker
Joshua Crocker

Reputation: 469

IntelliJ IDEA Error Running Application

I have created an application (which runs fine in Eclipse), but will not run within IntelliJ IDEA. Every time, it builds and then exits with the error: Error running Application: 'IntelliJ IDEA IU-163.9166.29' is not a valid JRE home.

Within IntelliJ I have an SDK set up: 1.8, pointing to /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home

Upvotes: 7

Views: 10046

Answers (2)

Abd Abughazaleh
Abd Abughazaleh

Reputation: 5495

You can solve that by two steps :

Step One :

File -> Project Structure -> Make Sure from project SDK

enter image description here

Step Two :

Go to Application name next of run button then click to drop down list and select Edit Configuration.

enter image description here

Upvotes: 2

Joshua Crocker
Joshua Crocker

Reputation: 469

After some messing around within the IDE, I have found out that, within the Run/Debug Configurations screen, there was a setting to set the JRE. This wasn't set to the correct value, so the program wasn't running. Upon changing it to the correct value, it worked.

Upvotes: 22

Related Questions