You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by 冯仁君 <fr...@126.com> on 2010/10/18 14:45:47 UTC

clean then package error

I'm new in using maven. when I try to package a helloworld maven program after I clean in the Eclipse IDE, it comes to an error. it says : 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project module: Compilation failure
Unable to locate the Javac Compiler in:
  D:\Java\jre6\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :module

I'm sure I have installed the jdk1.6, and my environment variable is also correct. I don't it's the problem of maven, but I don't know what to do. what can I do?

Re: clean then package error

Posted by Anders Hammar <an...@hammar.net>.
Does it work from command line? If so, move this to the m2eclipse users list
and ask for help there.

/Anders

2010/10/19 冯仁君 <fr...@126.com>

> yes, I do this from m2eclipse, not command line. and I have set eclipse
> running in jdk in the setting.ini of eclipse.
>
> my setting:
> -vm
> D:\Java\jdk1.6.0_21\bin\javaw.exe
>
> I think it's what you say,right?
> --------------------------------------------------
> From: "Anders Hammar" <an...@hammar.net>
> Sent: Tuesday, October 19, 2010 12:34 PM
>
> To: "Maven Users List" <us...@maven.apache.org>
> Subject: Re: clean then package error
>
>  You're doing tis from Eclipse/m2eclipe, right? Not command line? Is you're
>> Eclipseset up to use a JDK?
>>
>> http://tech.karolzielinski.com/m2eclipse-eclipse-is-running-in-a-jre-but-a-jdk-is-required
>>
>> /Anders
>>
>> 2010/10/19 冯仁君 <fr...@126.com>
>>
>>  yes,I know. but I have set the JAVA_HOME pointing to the directory of
>>> JDK.
>>> and when I run package without clean before, it works well.
>>> if I run clean, and then package, it's error!
>>>
>>> --------------------------------------------------
>>> From: "MK Tan" <mk...@gmail.com>
>>> Sent: Monday, October 18, 2010 11:34 PM
>>> To: "Maven Users List" <us...@maven.apache.org>
>>> Subject: Re: clean then package error
>>>
>>>  I should spell check before I sending this mail.
>>>
>>>>
>>>> Maven need jdk and not jre.
>>>> And if possible please include environment variable called JAVA_HOME
>>>> which
>>>> point to your jdk installation directory
>>>>
>>>> 2010/10/18 MK Tan <mk...@gmail.com>
>>>>
>>>>  Haven require jdk but you are refer to jre
>>>>
>>>>>
>>>>> On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
>>>>> > I'm new in using maven. when I try to package a helloworld maven >
>>>>> program
>>>>> after I clean in the Eclipse IDE, it comes to an error. it says :
>>>>> >
>>>>> > [ERROR] Failed to execute goal
>>>>> org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
>>>>> (default-compile) on project module: Compilation failure
>>>>> > Unable to locate the Javac Compiler in:
>>>>> > D:\Java\jre6\..\lib\tools.jar
>>>>> > Please ensure you are using JDK 1.4 or above and
>>>>> > not a JRE (the com.sun.tools.javac.Main class is required).
>>>>> > In most cases you can change the location of your Java
>>>>> > installation by setting the JAVA_HOME environment variable.
>>>>> > -> [Help 1]
>>>>> > [ERROR]
>>>>> > [ERROR] To see the full stack trace of the errors, re-run Maven with
>>>>> >  >
>>>>> the
>>>>> -e switch.
>>>>> > [ERROR] Re-run Maven using the -X switch to enable full debug >
>>>>> logging.
>>>>> > [ERROR]
>>>>> > [ERROR] For more information about the errors and possible solutions,
>>>>> please read the following articles:
>>>>> > [ERROR] [Help 1]
>>>>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>>>>> > [ERROR]
>>>>> > [ERROR] After correcting the problems, you can resume the build with
>>>>> >  >
>>>>> the
>>>>> command
>>>>> > [ERROR] mvn <goals> -rf :module
>>>>> >
>>>>> > I'm sure I have installed the jdk1.6, and my environment variable is
>>>>> >  >
>>>>> also
>>>>> correct. I don't it's the problem of maven, but I don't know what to
>>>>> do.
>>>>> what can I do?
>>>>>
>>>>>
>>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: clean then package error

Posted by Anders Hammar <an...@hammar.net>.
My experience is that both ways work.

/Anders

2010/12/2 Marshall Schor <ms...@schor.com>

>
>
> On 10/19/2010 6:14 AM, 冯仁君 wrote:
> > yes, I do this from m2eclipse, not command line. and I have set eclipse
> > running in jdk in the setting.ini of eclipse.
> >
> > my setting:
> > -vm
> > D:\Java\jdk1.6.0_21\bin\javaw.exe
> >
> > I think it's what you say,right?
>
> I think that's not right.
>
> should be without the \javaw.exe ... should end with ...\bin
>
> -Marshall Schor
> > --------------------------------------------------
> > From: "Anders Hammar" <an...@hammar.net>
> > Sent: Tuesday, October 19, 2010 12:34 PM
> > To: "Maven Users List" <us...@maven.apache.org>
> > Subject: Re: clean then package error
> >
> >> You're doing tis from Eclipse/m2eclipe, right? Not command line? Is
> you're
> >> Eclipseset up to use a JDK?
> >>
> http://tech.karolzielinski.com/m2eclipse-eclipse-is-running-in-a-jre-but-a-jdk-is-required
> >>
> >>
> >> /Anders
> >>
> >> 2010/10/19 冯仁君 <fr...@126.com>
> >>
> >>> yes,I know. but I have set the JAVA_HOME pointing to the directory of
> JDK.
> >>> and when I run package without clean before, it works well.
> >>> if I run clean, and then package, it's error!
> >>>
> >>> --------------------------------------------------
> >>> From: "MK Tan" <mk...@gmail.com>
> >>> Sent: Monday, October 18, 2010 11:34 PM
> >>> To: "Maven Users List" <us...@maven.apache.org>
> >>> Subject: Re: clean then package error
> >>>
> >>> I should spell check before I sending this mail.
> >>>>
> >>>> Maven need jdk and not jre.
> >>>> And if possible please include environment variable called JAVA_HOME
> which
> >>>> point to your jdk installation directory
> >>>>
> >>>> 2010/10/18 MK Tan <mk...@gmail.com>
> >>>>
> >>>> Haven require jdk but you are refer to jre
> >>>>>
> >>>>> On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
> >>>>> > I'm new in using maven. when I try to package a helloworld maven >
> >>>>> program
> >>>>> after I clean in the Eclipse IDE, it comes to an error. it says :
> >>>>> >
> >>>>> > [ERROR] Failed to execute goal
> >>>>> org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
> >>>>> (default-compile) on project module: Compilation failure
> >>>>> > Unable to locate the Javac Compiler in:
> >>>>> > D:\Java\jre6\..\lib\tools.jar
> >>>>> > Please ensure you are using JDK 1.4 or above and
> >>>>> > not a JRE (the com.sun.tools.javac.Main class is required).
> >>>>> > In most cases you can change the location of your Java
> >>>>> > installation by setting the JAVA_HOME environment variable.
> >>>>> > -> [Help 1]
> >>>>> > [ERROR]
> >>>>> > [ERROR] To see the full stack trace of the errors, re-run Maven
> with > >
> >>>>> the
> >>>>> -e switch.
> >>>>> > [ERROR] Re-run Maven using the -X switch to enable full debug >
> logging.
> >>>>> > [ERROR]
> >>>>> > [ERROR] For more information about the errors and possible
> solutions,
> >>>>> please read the following articles:
> >>>>> > [ERROR] [Help 1]
> >>>>>
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> >>>>> > [ERROR]
> >>>>> > [ERROR] After correcting the problems, you can resume the build
> with > >
> >>>>> the
> >>>>> command
> >>>>> > [ERROR] mvn <goals> -rf :module
> >>>>> >
> >>>>> > I'm sure I have installed the jdk1.6, and my environment variable
> is > >
> >>>>> also
> >>>>> correct. I don't it's the problem of maven, but I don't know what to
> do.
> >>>>> what can I do?
> >>>>>
> >>>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: clean then package error

Posted by Marshall Schor <ms...@schor.com>.

On 10/19/2010 6:14 AM, 冯仁君 wrote:
> yes, I do this from m2eclipse, not command line. and I have set eclipse
> running in jdk in the setting.ini of eclipse.
>
> my setting:
> -vm
> D:\Java\jdk1.6.0_21\bin\javaw.exe
>
> I think it's what you say,right?

I think that's not right.

should be without the \javaw.exe ... should end with ...\bin

-Marshall Schor
> --------------------------------------------------
> From: "Anders Hammar" <an...@hammar.net>
> Sent: Tuesday, October 19, 2010 12:34 PM
> To: "Maven Users List" <us...@maven.apache.org>
> Subject: Re: clean then package error
>
>> You're doing tis from Eclipse/m2eclipe, right? Not command line? Is you're
>> Eclipseset up to use a JDK?
>> http://tech.karolzielinski.com/m2eclipse-eclipse-is-running-in-a-jre-but-a-jdk-is-required
>>
>>
>> /Anders
>>
>> 2010/10/19 冯仁君 <fr...@126.com>
>>
>>> yes,I know. but I have set the JAVA_HOME pointing to the directory of JDK.
>>> and when I run package without clean before, it works well.
>>> if I run clean, and then package, it's error!
>>>
>>> --------------------------------------------------
>>> From: "MK Tan" <mk...@gmail.com>
>>> Sent: Monday, October 18, 2010 11:34 PM
>>> To: "Maven Users List" <us...@maven.apache.org>
>>> Subject: Re: clean then package error
>>>
>>> I should spell check before I sending this mail.
>>>>
>>>> Maven need jdk and not jre.
>>>> And if possible please include environment variable called JAVA_HOME which
>>>> point to your jdk installation directory
>>>>
>>>> 2010/10/18 MK Tan <mk...@gmail.com>
>>>>
>>>> Haven require jdk but you are refer to jre
>>>>>
>>>>> On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
>>>>> > I'm new in using maven. when I try to package a helloworld maven >
>>>>> program
>>>>> after I clean in the Eclipse IDE, it comes to an error. it says :
>>>>> >
>>>>> > [ERROR] Failed to execute goal
>>>>> org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
>>>>> (default-compile) on project module: Compilation failure
>>>>> > Unable to locate the Javac Compiler in:
>>>>> > D:\Java\jre6\..\lib\tools.jar
>>>>> > Please ensure you are using JDK 1.4 or above and
>>>>> > not a JRE (the com.sun.tools.javac.Main class is required).
>>>>> > In most cases you can change the location of your Java
>>>>> > installation by setting the JAVA_HOME environment variable.
>>>>> > -> [Help 1]
>>>>> > [ERROR]
>>>>> > [ERROR] To see the full stack trace of the errors, re-run Maven with > >
>>>>> the
>>>>> -e switch.
>>>>> > [ERROR] Re-run Maven using the -X switch to enable full debug > logging.
>>>>> > [ERROR]
>>>>> > [ERROR] For more information about the errors and possible solutions,
>>>>> please read the following articles:
>>>>> > [ERROR] [Help 1]
>>>>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>>>>> > [ERROR]
>>>>> > [ERROR] After correcting the problems, you can resume the build with > >
>>>>> the
>>>>> command
>>>>> > [ERROR] mvn <goals> -rf :module
>>>>> >
>>>>> > I'm sure I have installed the jdk1.6, and my environment variable is > >
>>>>> also
>>>>> correct. I don't it's the problem of maven, but I don't know what to do.
>>>>> what can I do?
>>>>>
>>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: clean then package error

Posted by 冯仁君 <fr...@126.com>.
yes, I do this from m2eclipse, not command line. and I have set eclipse 
running in jdk in the setting.ini of eclipse.

my setting:
-vm
D:\Java\jdk1.6.0_21\bin\javaw.exe

I think it's what you say,right?
--------------------------------------------------
From: "Anders Hammar" <an...@hammar.net>
Sent: Tuesday, October 19, 2010 12:34 PM
To: "Maven Users List" <us...@maven.apache.org>
Subject: Re: clean then package error

> You're doing tis from Eclipse/m2eclipe, right? Not command line? Is you're
> Eclipseset up to use a JDK?
> http://tech.karolzielinski.com/m2eclipse-eclipse-is-running-in-a-jre-but-a-jdk-is-required
>
> /Anders
>
> 2010/10/19 冯仁君 <fr...@126.com>
>
>> yes,I know. but I have set the JAVA_HOME pointing to the directory of 
>> JDK.
>> and when I run package without clean before, it works well.
>> if I run clean, and then package, it's error!
>>
>> --------------------------------------------------
>> From: "MK Tan" <mk...@gmail.com>
>> Sent: Monday, October 18, 2010 11:34 PM
>> To: "Maven Users List" <us...@maven.apache.org>
>> Subject: Re: clean then package error
>>
>>  I should spell check before I sending this mail.
>>>
>>> Maven need jdk and not jre.
>>> And if possible please include environment variable called JAVA_HOME 
>>> which
>>> point to your jdk installation directory
>>>
>>> 2010/10/18 MK Tan <mk...@gmail.com>
>>>
>>>  Haven require jdk but you are refer to jre
>>>>
>>>> On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
>>>> > I'm new in using maven. when I try to package a helloworld maven >
>>>> program
>>>> after I clean in the Eclipse IDE, it comes to an error. it says :
>>>> >
>>>> > [ERROR] Failed to execute goal
>>>> org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
>>>> (default-compile) on project module: Compilation failure
>>>> > Unable to locate the Javac Compiler in:
>>>> > D:\Java\jre6\..\lib\tools.jar
>>>> > Please ensure you are using JDK 1.4 or above and
>>>> > not a JRE (the com.sun.tools.javac.Main class is required).
>>>> > In most cases you can change the location of your Java
>>>> > installation by setting the JAVA_HOME environment variable.
>>>> > -> [Help 1]
>>>> > [ERROR]
>>>> > [ERROR] To see the full stack trace of the errors, re-run Maven with 
>>>> >  >
>>>> the
>>>> -e switch.
>>>> > [ERROR] Re-run Maven using the -X switch to enable full debug 
>>>> > logging.
>>>> > [ERROR]
>>>> > [ERROR] For more information about the errors and possible solutions,
>>>> please read the following articles:
>>>> > [ERROR] [Help 1]
>>>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>>>> > [ERROR]
>>>> > [ERROR] After correcting the problems, you can resume the build with 
>>>> >  >
>>>> the
>>>> command
>>>> > [ERROR] mvn <goals> -rf :module
>>>> >
>>>> > I'm sure I have installed the jdk1.6, and my environment variable is 
>>>> >  >
>>>> also
>>>> correct. I don't it's the problem of maven, but I don't know what to 
>>>> do.
>>>> what can I do?
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: clean then package error

Posted by Anders Hammar <an...@hammar.net>.
You're doing tis from Eclipse/m2eclipe, right? Not command line? Is you're
Eclipseset up to use a JDK?
http://tech.karolzielinski.com/m2eclipse-eclipse-is-running-in-a-jre-but-a-jdk-is-required

/Anders

2010/10/19 冯仁君 <fr...@126.com>

> yes,I know. but I have set the JAVA_HOME pointing to the directory of JDK.
> and when I run package without clean before, it works well.
> if I run clean, and then package, it's error!
>
> --------------------------------------------------
> From: "MK Tan" <mk...@gmail.com>
> Sent: Monday, October 18, 2010 11:34 PM
> To: "Maven Users List" <us...@maven.apache.org>
> Subject: Re: clean then package error
>
>  I should spell check before I sending this mail.
>>
>> Maven need jdk and not jre.
>> And if possible please include environment variable called JAVA_HOME which
>> point to your jdk installation directory
>>
>> 2010/10/18 MK Tan <mk...@gmail.com>
>>
>>  Haven require jdk but you are refer to jre
>>>
>>> On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
>>> > I'm new in using maven. when I try to package a helloworld maven >
>>> program
>>> after I clean in the Eclipse IDE, it comes to an error. it says :
>>> >
>>> > [ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
>>> (default-compile) on project module: Compilation failure
>>> > Unable to locate the Javac Compiler in:
>>> > D:\Java\jre6\..\lib\tools.jar
>>> > Please ensure you are using JDK 1.4 or above and
>>> > not a JRE (the com.sun.tools.javac.Main class is required).
>>> > In most cases you can change the location of your Java
>>> > installation by setting the JAVA_HOME environment variable.
>>> > -> [Help 1]
>>> > [ERROR]
>>> > [ERROR] To see the full stack trace of the errors, re-run Maven with >
>>> the
>>> -e switch.
>>> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>>> > [ERROR]
>>> > [ERROR] For more information about the errors and possible solutions,
>>> please read the following articles:
>>> > [ERROR] [Help 1]
>>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>>> > [ERROR]
>>> > [ERROR] After correcting the problems, you can resume the build with >
>>> the
>>> command
>>> > [ERROR] mvn <goals> -rf :module
>>> >
>>> > I'm sure I have installed the jdk1.6, and my environment variable is >
>>> also
>>> correct. I don't it's the problem of maven, but I don't know what to do.
>>> what can I do?
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: clean then package error

Posted by 冯仁君 <fr...@126.com>.
yes,I know. but I have set the JAVA_HOME pointing to the directory of JDK.
and when I run package without clean before, it works well.
if I run clean, and then package, it's error!

--------------------------------------------------
From: "MK Tan" <mk...@gmail.com>
Sent: Monday, October 18, 2010 11:34 PM
To: "Maven Users List" <us...@maven.apache.org>
Subject: Re: clean then package error

> I should spell check before I sending this mail.
>
> Maven need jdk and not jre.
> And if possible please include environment variable called JAVA_HOME which
> point to your jdk installation directory
>
> 2010/10/18 MK Tan <mk...@gmail.com>
>
>> Haven require jdk but you are refer to jre
>>
>> On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
>> > I'm new in using maven. when I try to package a helloworld maven 
>> > program
>> after I clean in the Eclipse IDE, it comes to an error. it says :
>> >
>> > [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
>> (default-compile) on project module: Compilation failure
>> > Unable to locate the Javac Compiler in:
>> > D:\Java\jre6\..\lib\tools.jar
>> > Please ensure you are using JDK 1.4 or above and
>> > not a JRE (the com.sun.tools.javac.Main class is required).
>> > In most cases you can change the location of your Java
>> > installation by setting the JAVA_HOME environment variable.
>> > -> [Help 1]
>> > [ERROR]
>> > [ERROR] To see the full stack trace of the errors, re-run Maven with 
>> > the
>> -e switch.
>> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> > [ERROR]
>> > [ERROR] For more information about the errors and possible solutions,
>> please read the following articles:
>> > [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>> > [ERROR]
>> > [ERROR] After correcting the problems, you can resume the build with 
>> > the
>> command
>> > [ERROR] mvn <goals> -rf :module
>> >
>> > I'm sure I have installed the jdk1.6, and my environment variable is 
>> > also
>> correct. I don't it's the problem of maven, but I don't know what to do.
>> what can I do?
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: clean then package error

Posted by MK Tan <mk...@gmail.com>.
I should spell check before I sending this mail.

Maven need jdk and not jre.
And if possible please include environment variable called JAVA_HOME which
point to your jdk installation directory

2010/10/18 MK Tan <mk...@gmail.com>

> Haven require jdk but you are refer to jre
>
> On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
> > I'm new in using maven. when I try to package a helloworld maven program
> after I clean in the Eclipse IDE, it comes to an error. it says :
> >
> > [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
> (default-compile) on project module: Compilation failure
> > Unable to locate the Javac Compiler in:
> > D:\Java\jre6\..\lib\tools.jar
> > Please ensure you are using JDK 1.4 or above and
> > not a JRE (the com.sun.tools.javac.Main class is required).
> > In most cases you can change the location of your Java
> > installation by setting the JAVA_HOME environment variable.
> > -> [Help 1]
> > [ERROR]
> > [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> > [ERROR]
> > [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> > [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> > [ERROR]
> > [ERROR] After correcting the problems, you can resume the build with the
> command
> > [ERROR] mvn <goals> -rf :module
> >
> > I'm sure I have installed the jdk1.6, and my environment variable is also
> correct. I don't it's the problem of maven, but I don't know what to do.
> what can I do?
>

Re: clean then package error

Posted by MK Tan <mk...@gmail.com>.
Haven require jdk but you are refer to jre

On Oct 18, 2010 8:46 PM, "冯仁君" <fr...@126.com> wrote:
> I'm new in using maven. when I try to package a helloworld maven program
after I clean in the Eclipse IDE, it comes to an error. it says :
>
> [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
(default-compile) on project module: Compilation failure
> Unable to locate the Javac Compiler in:
> D:\Java\jre6\..\lib\tools.jar
> Please ensure you are using JDK 1.4 or above and
> not a JRE (the com.sun.tools.javac.Main class is required).
> In most cases you can change the location of your Java
> installation by setting the JAVA_HOME environment variable.
> -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
please read the following articles:
> [ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
command
> [ERROR] mvn <goals> -rf :module
>
> I'm sure I have installed the jdk1.6, and my environment variable is also
correct. I don't it's the problem of maven, but I don't know what to do.
what can I do?