Executing Maven results in Cannot Find JRE 1.5 error

I am trying to execute maven clean install from the maven projects window and after clicking run I get an error:

Error running <Project> [clean,install]: Cannot find JRE 1.5

The thing is that I don't even see where I ever had a JRE 1.5 declared in my environment - I am using Jdk 1.6.

Any ideas as to where this could be coming from? I have checked File-> Project Structure -> SDKS and don't see it there.

I am sure this is some sort of user error so help is hugely appreciated.

4 comments
Comment actions Permalink

I had once similar problem. Have a look at 'Settings->Maven->Runner' whether a correct JRE is included. Sometimes wrong JRE reference is used there.


0
Comment actions Permalink

I believe what happened is my JDK JAVA_HOME on My Mac was set to the 1.5 JRE at one time when I started with IntelliJ. I have since migrated to 1.6, however the directory is the same place as the 1.5 on a Mac as Mac just uses a symlink.

So IntelliJ doesn't recognize the change in the maven view. I was able to click edit configurations then click on a maven run configuration and then edit defaults to change the default JRE under the runner tab to Internal JRE and everything works fine now.

Thanks!!!

0
Comment actions Permalink

I just posted how I worked around this issue.

0
Comment actions Permalink

To Adam P: Where is this posting you mentioned. I think I might have similar problem and would like to fix it (However my problem is on XP)

0

Please sign in to leave a comment.