Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / August 2003

Tip: Looking for answers? Try searching our database.

ECLIPSE with ANT javac target

Thread view: 
Blondel Christophe - 23 Jul 2003 12:40 GMT
Hi,

I want to re-use a Java project i used to compile with an ant
build.xml file.
I want to import this project into Eclipse 2.1 because of the rich
functionalities of this IDE and re-use this build.xml file to compile.

But whenever i launch the compile target, i've got this error:

compile:
      [javac] Compiling 1 source file
      [javac] Modern compiler not found - looking for classic
compiler
      [javac] BUILD FAILED:
file:D:/eclipse/workspace/HW/projectBuilder.xml:4: Cannot use classic
compiler, as it is not available.  A common solution is to set the
environment variable JAVA_HOME to your jdk directory.

My JAVA_HOME variable in set to C:\jdk1.3.1_6 but do i need to
indicate anywhere in ECLIPSE also ?

Thanks,
C.Blondel
Trebor - 23 Jul 2003 22:42 GMT
You need a jdk 1.4.1 or above (modern compiler)

> Hi,
>
[quoted text clipped - 19 lines]
> Thanks,
> C.Blondel
chrisb - 31 Jul 2003 10:21 GMT
> Hi,
>
[quoted text clipped - 19 lines]
> Thanks,
> C.Blondel

Hi,

I had the same problem. One fix is to add the tools.jar file to the
Classpath of the ANT Runtime Preferences.

Menu:    Window
         -> Preferences
Sector:  Ant
         -> Runtime
Add tools.jar to Classpath:
         -> "Add JARs..." button

CH.B.
Sharath - 04 Aug 2003 19:23 GMT
Javac runs in two modes, modern and classic. You can change the mode
via command line args to javac. You will have to change your ANT
script to use the modern compiler.

It also looks like your Eclipse contains a Javac of JDK 1.1 or 1.2.
The modern compiler is available only in 1.3 or 1.4.

> Hi,
>
[quoted text clipped - 19 lines]
> Thanks,
> C.Blondel


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.