Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Run Ant Compilation Error
Run Ant Compilation Error [message #52414] Sun, 13 April 2003 00:26 Go to next message
Eclipse UserFriend
Originally posted by: qsu.cj.com

Hi,

I'm new with eclipse. I opened a working project in eclipse, and tried to
use "run ant" on "build.xml", it gives me an error msg:

"Modern compiler is not available - using classic compiler
Build exception: C:\eclipse\ex2\build.xml:68: Cannot use classic compiler,
as it is not available A common solution is to set the environment
variable JAVA_HOME to your jdk directory."

However, I know that the variable JAVA_HOME is set up correctly in my
system. And, if I run ant from command line, it works. Aslo, if I create
a new external tool that runs from local installed ant and it works!

I believe it must be some configuration issue. Any suggestions?

Thanks.

Qian
Re: Run Ant Compilation Error [message #52426 is a reply to message #52414] Sun, 13 April 2003 01:19 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Qian,

You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
preference pages.
Another option is to start Eclipse using the -vm arg so that Eclipse is
launched using your JDK install VM. This way Eclipse will automatically add
the
tools.jar to the Ant runtime classpath.

HTH
Darins
BTW in the future please ask these types of questions on the eclipse.tools
newsgroup

"Qian Su" <qsu@cj.com> wrote in message news:b7aash$3sb$1@rogue.oti.com...
> Hi,
>
> I'm new with eclipse. I opened a working project in eclipse, and tried to
> use "run ant" on "build.xml", it gives me an error msg:
>
> "Modern compiler is not available - using classic compiler
> Build exception: C:\eclipse\ex2\build.xml:68: Cannot use classic compiler,
> as it is not available A common solution is to set the environment
> variable JAVA_HOME to your jdk directory."
>
> However, I know that the variable JAVA_HOME is set up correctly in my
> system. And, if I run ant from command line, it works. Aslo, if I create
> a new external tool that runs from local installed ant and it works!
>
> I believe it must be some configuration issue. Any suggestions?
>
> Thanks.
>
> Qian
>
>
>
Re: Run Ant Compilation Error [message #52458 is a reply to message #52426] Sun, 13 April 2003 17:06 Go to previous message
Eclipse UserFriend
Originally posted by: qsu.cj.com

Thanks!

Qian

Darin Swanson wrote:

> Qian,

> You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
> preference pages.
> Another option is to start Eclipse using the -vm arg so that Eclipse is
> launched using your JDK install VM. This way Eclipse will automatically add
> the
> tools.jar to the Ant runtime classpath.

> HTH
> Darins
> BTW in the future please ask these types of questions on the eclipse.tools
> newsgroup

> \"Qian Su\" <qsu@cj.com> wrote in message news:b7aash$3sb$1@rogue.oti.com...
> > Hi,
> >
> > I\'m new with eclipse. I opened a working project in eclipse, and tried to
> > use \"run ant\" on \"build.xml\", it gives me an error msg:
> >
> > \"Modern compiler is not available - using classic compiler
> > Build exception: C:\\eclipse\\ex2\\build.xml:68: Cannot use classic
compiler,
> > as it is not available A common solution is to set the environment
> > variable JAVA_HOME to your jdk directory.\"
> >
> > However, I know that the variable JAVA_HOME is set up correctly in my
> > system. And, if I run ant from command line, it works. Aslo, if I create
> > a new external tool that runs from local installed ant and it works!
> >
> > I believe it must be some configuration issue. Any suggestions?
> >
> > Thanks.
> >
> > Qian
> >
> >
> >
Re: Run Ant Compilation Error [message #592936 is a reply to message #52414] Sun, 13 April 2003 01:19 Go to previous message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Qian,

You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
preference pages.
Another option is to start Eclipse using the -vm arg so that Eclipse is
launched using your JDK install VM. This way Eclipse will automatically add
the
tools.jar to the Ant runtime classpath.

HTH
Darins
BTW in the future please ask these types of questions on the eclipse.tools
newsgroup

"Qian Su" <qsu@cj.com> wrote in message news:b7aash$3sb$1@rogue.oti.com...
> Hi,
>
> I'm new with eclipse. I opened a working project in eclipse, and tried to
> use "run ant" on "build.xml", it gives me an error msg:
>
> "Modern compiler is not available - using classic compiler
> Build exception: C:\eclipse\ex2\build.xml:68: Cannot use classic compiler,
> as it is not available A common solution is to set the environment
> variable JAVA_HOME to your jdk directory."
>
> However, I know that the variable JAVA_HOME is set up correctly in my
> system. And, if I run ant from command line, it works. Aslo, if I create
> a new external tool that runs from local installed ant and it works!
>
> I believe it must be some configuration issue. Any suggestions?
>
> Thanks.
>
> Qian
>
>
>
Re: Run Ant Compilation Error [message #592951 is a reply to message #52426] Sun, 13 April 2003 17:06 Go to previous message
Qian Su is currently offline Qian SuFriend
Messages: 2
Registered: July 2009
Junior Member
Thanks!

Qian

Darin Swanson wrote:

> Qian,

> You need to add a jdk tools.jar to the Ant runtime classpath using the Ant
> preference pages.
> Another option is to start Eclipse using the -vm arg so that Eclipse is
> launched using your JDK install VM. This way Eclipse will automatically add
> the
> tools.jar to the Ant runtime classpath.

> HTH
> Darins
> BTW in the future please ask these types of questions on the eclipse.tools
> newsgroup

> \"Qian Su\" <qsu@cj.com> wrote in message news:b7aash$3sb$1@rogue.oti.com...
> > Hi,
> >
> > I\'m new with eclipse. I opened a working project in eclipse, and tried to
> > use \"run ant\" on \"build.xml\", it gives me an error msg:
> >
> > \"Modern compiler is not available - using classic compiler
> > Build exception: C:\\eclipse\\ex2\\build.xml:68: Cannot use classic
compiler,
> > as it is not available A common solution is to set the environment
> > variable JAVA_HOME to your jdk directory.\"
> >
> > However, I know that the variable JAVA_HOME is set up correctly in my
> > system. And, if I run ant from command line, it works. Aslo, if I create
> > a new external tool that runs from local installed ant and it works!
> >
> > I believe it must be some configuration issue. Any suggestions?
> >
> > Thanks.
> >
> > Qian
> >
> >
> >
Previous Topic:Run Ant Compilation Error
Next Topic:OSGi support
Goto Forum:
  


Current Time: Sat Aug 24 11:17:46 GMT 2024

Powered by FUDForum. Page generated in 0.04074 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top