I've been having a problem where the java installation that the maven
embedder is going
to use to execute goals is the JRE and not the JDK. See the screenshot
for the error.
To reproduce, delete your "runtime-EclipseApplication" directory
first, checked out the maven-trunk
(http://svn.apache.org/repos/asf/maven/components/trunk ),
use the "import maven 2" function to import it into the workspace,
then run the process-test-resources goal on the maven-lifecycle project
by using:
right click on project > run as > Open run dialog > Maven 2 >
then create a new maven 2 launch configuration, the project should be
maven-lifecycle,
the goal should be "process-test-resources", then click "Run" ..
Based on the screenshot, the java installation that the maven embedder used
is the JRE which is wrong. The problem is, I don't know how to
indicate to the maven
embedder to use the JDK.
I have already indicated in Window > Preferences > Java > Installed JREs to use
the JDK installation, also in Window > Preferences > Plugin
Development > Target Platform > Environment > Java Runtime Environment
> Target JRE. I also have made sure that
the JDK /bin path is first in the PATH variable, still, the problem persist.
Any ideas would be greatly appreciated ....
Cheers,
Erle
--
A world without C++ is chaos.
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
On Sep 12, 12:39 am, "Abel Muiño" <amu...@gmail.com> wrote:
> You should launch eclipse with the JDK. By default, it uses the installed
> JRE.
>
> To do so, use the option -vm pointing to your javaw.exe. For example:
> eclipse -vm c:\JDK\bin\javaw.exe
>
> Hope this helps!
>
This does not seem to work launching eclipse with eclipse -vm c:\JDK
\bin\javaw.exe.
Is there any configuration i need to do with system environment?
On Sep 12, 12:39 am, "Abel Muiño" <amu...@gmail.com> wrote:
> You should launch eclipse with the JDK. By default, it uses the installed
> JRE.
>
> To do so, use the option -vm pointing to your javaw.exe. For example:
> eclipse -vm c:\JDK\bin\javaw.exe
>
> Hope this helps!
>
> On 9/11/07, erle mantos < eman...@gmail.com> wrote:
>
>
>
> > Hi Guys,..
>
> > I've been having a problem where the java installation that the maven
> > embedder is going
> > to use to execute goals is the JRE and not the JDK. See the screenshot
> > for the error.
>
> > To reproduce, delete your "runtime-EclipseApplication" directory
> > first, checked out the maven-trunk
i posted the same problem in the users list too:
http://groups.google.com/group/q4e-users/browse_thread/thread/6770ba1c0f8cb65a/45ff0f435d568b1d#45ff0f435d568b1d
there is one big thing in this: eclipse only needs a JRE to run. one
should not need to start eclipse with a full JDK.
in the eclipse preferences one then configures a default jre (actually
you will configure jdk's in here) and maybe some additionals ones. so
for me: i got three jdk configured: 1.4, 1.5, 1.6, 1.4 as default. yet
i start eclipse with jre 1.6
my maven-ized projects inherit the default 1.4 jdk. also the 1.4
system classes are added to the classpath (tools.jar) but when i run
goals via q4e the missing tools jars is reported. which is true since
i started eclipse with jre 1.6, yet i want to use a jdk 1.4 to compile
things. so q4e should use the jdk configured for the project to
compile things. it must not use the jre that was used to start
eclipse. actually it is quite normal to use a different one. java 1.6
is faster, looks better for rcp things. but yet projects really need
to compile withe the proper jdk if one does not want to run into
minor, major class version trouble or serialUid weirdness.
i dont know how eclipse does this with standard projects, obviously
there must some way, otherwise i would have never been able to compile
anything :)
if yo only need to make things work: copy the 1.6 jdk into ECLIPSE/jre
folder. that allows q4e to work but it then ignores the project
settings for the jdk.
indeed the results will differ. but to be honest that is the
responsibility of the developer to take care command line build match
the eclipse builds.
but the other way around should be working too: if my command line
environment is set to jdk 1.4 and i run eclipse with 1.6 (speed, look,
plugins requirements) and configure the project to use 1.4 then i must
rely on eclipse it is actually doing what it is told.
so in migration status (some java 1.4 projects, some 1.5) both jdk
will be around, and i would create some mvn4 script to use jdk 1.4 and
some mvn5 script to use jdk 1.5 on the command line. in eclipse the
comfort will be to define the right jdk.
the jdk is not a setting that can be ignored. even if i can use 1.6 to
create 1.4 classes, some jdbc interfaces have changed. if i implement
one of those some methods are suddenly missing. so not everything will
compile with a newer jdk.
its a must have from my point of view :)
regards
ossi
On 21 Sep., 16:34, "Carlos Sanchez" <car...@apache.org> wrote:
> well, this is tricky, because if we honor the eclipse settings then if
> you run maven from the command line you are going to get different
> results. If you configure a specific JDK in the pom as inhttp://maven.apache.org/plugins/maven-compiler-plugin/examples/compil...
> then it will be used both in Eclipse and in the command line.
>
> On 9/21/07, ossi <knud...@gmail.com> wrote:
>
>
>
>
>
> > hallo
>
> > i posted the same problem in the users list too:
> >http://groups.google.com/group/q4e-users/browse_thread/thread/6770ba1...