Search code examples
javaintellij-idea

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


Solution

  • 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.