Not Valid JRE Home

Hiya, I am Alex.

     I recently started learning java programming and downloaded IntelliJ IDEA 131.4. I am attempting to program for minecraft mods as a hobby and self learning. I have Java JDK 1.7.0 v 67 for 32bit and 64bit JDK. I am having trouble with the run program portion, I set up the Enviroment variables to point to the 32bit and 64 bit paths which my programs are on a separate partion. I get a error of  Warning that the location under use alternative JRE is a not a valid JRE home. I have checked and the JDK are properly installed and running via CMD. If I try to unckeck the use alternative JRE, I get No JDK specified for module 'Testmod'

     Any help or tips would be appricated and I have included screenshots of the errors and system info. Thanks for your time.

System info.JPG
JDK Error IntelliJ IDEA.JPG
JRE Error IntelliJ IDEA.JPG
Comment actions Permalink

Welecome to the IntelliJ IDEA community.

It's rare that you will ever need to use the "Use alternative JRE" options. That's for a case where you want to run/test some code under a JRE different than what you are using to develop with. Normally you just use the JDK (and its included JRE) that is defined for the module. That leads us to your original issue...

The "No JDK specified for module 'Testmod" indicates that in your Project Structure, a JDK is not defined for the module. This would preclude you from doing any compiling or running of the code.In most cases, a module will simply use the JDK configured for the project (this is the default). A project in turn uses a defined JDK. To fix this:

  1. Open File > Project Structure (Ctrl+Alt+Shift+S)
  2. On the left, select "Modules"
  3. In the middle, select the 'Testmod' module
  4. Select the dependencies tab
  5. In the "Module SDK" field, select "Project SDK" (or if desired another JDK).
  6. To configure the project SDK, select "Project" on the left and set it via the "Project SDK" field
  7. To configure a (new) JDK, select SDKs on the left and click the add button add2.png and select "JDK". Select the JDK root (E:\Program Files\Java\jdk1.7.0_67).
Comment actions Permalink

Check "Run configuration". Something is malformated in there. In my case I have a newer version of Java set. 


Please sign in to leave a comment.