7041: Can't run Maven goal ("Cannot find JRE")

Build 7041, JDK 6, Ubuntu Feisty

I've imported a number of Maven 2 POMs into a new project. I am intermittently getting an error when trying to run a goal (like "clean") from a POM from within the "Maven projects" pane. A dialog pops up saying
Error running : Cannot find JRE ''

I can run this goal (or any) from the command line, again using JDK 6 and Maven 2.0.6. I've tried changing the settings in the Maven Integration dialog to
- set Maven home and check/uncheck "override"
- choose to use embedded Maven
- choose internal Maven with JRE: "1.6", internal, or JAVA_HOME

No messages or errors appear in the logs when this happens.

I got this when I first imported the POMs, but was able to pick a task and choose "Debug " instead of "Run ". After reopening the project, neither Run nor Debug work.


Patrick

8 comments

Hello Patrick,

The error message will be more helpful in the next EAP build, please check
what it says when this happens.

Best regards,

Vladislav Kaznacheev
Project Manager, IntelliJ IDEA
http://www.jetbrains.com
"Develop with Pleasure!"

Build 7041, JDK 6, Ubuntu Feisty

I've imported a number of Maven 2 POMs into a new project. I am
intermittently getting an error when trying to run a goal (like
"clean") from a POM from within the "Maven projects" pane. A dialog
pops up saying

Error running : Cannot find JRE ''

I can run this goal (or any) from the command line, again using JDK 6
and Maven 2.0.6. I've tried changing the settings in the Maven
Integration dialog to

- set Maven home and check/uncheck "override"

- choose to use embedded Maven

- choose internal Maven with JRE: "1.6", internal, or JAVA_HOME

No messages or errors appear in the logs when this happens.

I got this when I first imported the POMs, but was able to pick a task
and choose "Debug " instead of "Run ". After reopening the
project, neither Run nor Debug work.

Patrick



0

HI Vladislav

Hello Patrick,

The error message will be more helpful in the next
EAP build, please check
what it says when this happens.

Best regards,

Vladislav Kaznacheev


Build 7051--same error, only difference is that error message includes the module name and goal ("Error running mymodule : Cannot find JRE ''"


Thanks for your help
Patrick

0

I am having the same issues with 7104. Is there a solution?

0

Hi,

I've just installed the 7.0 final release and I still get the "Cannot find JRE" when I right click on a particular goal and try to run it. Is there something I am doing wrong here?

Thx,

Ben

0

I can confirm this happens for me on IDEA 7 final, as well.

>java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode, sharing)


Patrick

0

I've just found a workaround:

If you go to the Run configurations and click on Edit Defaults, then go to the Maven option, go to the build tab and then use a different JRE from the drop down list.

What I would still like to know is why the skip tests toggle does not pass the -Dmaven.test.skip=true flag to the embedded mvn process....

HTH,

Ben

0

Do you have JDK configured in idea?
This could have happened if you renamed or removed jdk that was used to run maven previously.

0

That has indeed been the problem for me... the IWS-file contained old references to a jre that was no longer present. It doesn't show in the settings menus, though.

By the way the same problem seems to exist for the mavenHome variable... it also didn't accept the settings i specified for the project because there was a blank entry in the IWS-File.

0

Please sign in to leave a comment.