[jsword-devel] How do you use eclipse to run a default ANT task?

jsword-devel@crosswire.org jsword-devel@crosswire.org
14 Mar 2003 15:49:38 -0000


I believe the problem is how Ant is set up inside Eclipse. The reason you can run the jsword-ant-deploy task may be that it is not using the compiler at all, but only copying files. 
I had this problem and I forgot exactly which solution fixed it ... either you need to put tools.jar into Ant\'s classpath (which is in the preferences window -> External Tools -> Ant) or set the JAVA_HOME environment variable to point to a JDK (in windows, that\'s in control panel -> system -> advanced -> environment variables) 

As I recall, that should do it. If not, hopefully I can help because I\'ve had this problem and solved it with earlier builds of Eclipse. 

 >> I need to document this in some way - you\'re not the first to ask. They
 >> are generated from the .xsd file. Just run the default ANT task and they
 >> will all be created for you
 >
 >I\'m new to eclipse too, and I\'m using the bleeding edge releases... is
 >running ant tasks different with in eclipse 2.0? I\'m forever asked which of
 >the ant tasks I would like to run, and the only one that works is
 >jsword-ant-clean. All the others complain of being unable to find javac.
 >
 >eg jsword-ant-deploy
 >
 >init:
 >        [echo] Building to: target/ant
 >
 >xjc.check:
 >
 >xjc:
 >
 >compile:
 >
 >compile.section:
 >        [echo] Compiling ./java/common
 >       [mkdir] Created dir: C:\\jsword\\target\\ant\\temp\\classes\\common
 >       [javac] Compiling 96 source files to
 >C:\\jsword\\target\\ant\\temp\\classes\\common
 >       [javac] BUILD FAILED: file:C:/jsword/build.xml:141: Unable to find a
 >javac compiler;
 >com.sun.tools.javac.Main is not on the classpath.
 >Perhaps JAVA_HOME does not point to the JDK
 >Total time: 681 milliseconds
 >
 >Stephen.
 >--
 >Datacute - Acute Information Revelation Tools
 >http://www.datacute.co.nz/
 >
 >_______________________________________________
 >jsword-devel mailing list
 >jsword-devel@crosswire.org
 >http://www.crosswire.org/mailman/listinfo/jsword-devel
 >