简体   繁体   中英

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

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.

You can solve that by two steps :

Step One :

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

在此处输入图片说明

Step Two :

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

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM