On 5/25/05, Mark Lundquist <[EMAIL PROTECTED]> wrote: Hi all, ... > So "org.w3c.tidy.Tidy" has absolutely nothing to do with where Tidy.jar > lives. It has everything to do with what you see when you do "jar tf > Tidy.jar" (try that command and you'll see what I mean).
ahh, thank you for explaining that :) the jar is now at: lib/Tidy.jar > Anyway, just from glancing over your stuff I'm not sure what your > problem is at this point. You might try using > "${basedir}/lib/Tidy.jar" in your classpath setting. See if the '-v' > and/or '-d' flags to ant shed any light. what I've done is to go to plain vanilla javac, albeit with an arg file cleverly named, you guessed it, "argFile.txt," yes, the ".txt" isn't required. That the compile is without error "clears" Test16.java and Tidy.jar, this leaves (to paraphrase sherlock holmes) build.xml and properties.tidy.xml as the culprits. yes? looking at the javac command, I think the error lies in not using the path element id, which I must read up on. however, since I've gone through the trouble of writing this up I'll go ahead and send it to the list ;) here's all the data: [EMAIL PROTECTED] java]$ [EMAIL PROTECTED] java]$ cat argFile.txt src/atreides/tidyXhtml/Test16.java -d bin -classpath lib/Tidy.jar [EMAIL PROTECTED] java]$ javac @argFile.txt [EMAIL PROTECTED] java]$ ant -d -v Apache Ant version 1.6.4 compiled on May 19 2005 Apache Ant version 1.6.4 compiled on May 19 2005 Buildfile: build.xml Detected Java version: 1.5 in: /usr/java/jdk1.5.0_02/jre Detected OS: Linux parsing buildfile /home/thufir/java/build.xml with URI = file:///home/thufir/java/build.xmlProject base dir set to: /home/thufir/java Importing file properties.tidy.xml from /home/thufir/java/build.xml parsing buildfile /home/thufir/java/properties.tidy.xml with URI = file:///home/thufir/java/properties.tidy.xml Override ignored for property user.name Build sequence for target(s) `package' is [clean, prepare, compile, package] Complete build sequence is [clean, prepare, compile, package, ] clean: [delete] Deleting directory /home/thufir/java/bin [delete] Deleting /home/thufir/java/bin/atreides/xhtml/Test16.class [delete] Deleting directory /home/thufir/java/bin/atreides/xhtml [delete] Deleting directory /home/thufir/java/bin/atreides [delete] Deleting directory /home/thufir/java/bin prepare: [mkdir] Created dir: /home/thufir/java/bin compile: Property ${includeJar} has not been set [javac] Test16.java added as Test16.class doesn't exist. [javac] Test16.java.1 skipped - don't know how to handle it [javac] Test16.java.2 skipped - don't know how to handle it [javac] Test16.java.3 skipped - don't know how to handle it [javac] Test16.java.4 skipped - don't know how to handle it [javac] Test16.java.5 skipped - don't know how to handle it [javac] Test16.java.6 skipped - don't know how to handle it [javac] Compiling 1 source file to /home/thufir/java/bin [javac] Using modern compiler dropping /home/thufir/java/${includeJar} from path as it doesn't exist [javac] Compilation arguments: [javac] '-d' [javac] '/home/thufir/java/bin' [javac] '-classpath' [javac] '/home/thufir/java/bin:/usr/local/ant/lib/ant-launcher.jar:/usr/local/ant/lib/ant-nodeps.jar:/usr/local/ant/lib/ant-apache-regexp.jar:/usr/local/ant/lib/ant-jmf.jar:/usr/local/ant/lib/ant-icontract.jar:/usr/local/ant/lib/ant-junit.jar:/usr/local/ant/lib/ant-commons-net.jar:/usr/local/ant/lib/ant-xslp.jar:/usr/local/ant/lib/ant-apache-resolver.jar:/usr/local/ant/lib/ant-trax.jar:/usr/local/ant/lib/ant-apache-log4j.jar:/usr/local/ant/lib/ant-jdepend.jar:/usr/local/ant/lib/xercesImpl.jar:/usr/local/ant/lib/ant-antlr.jar:/usr/local/ant/lib/xml-apis.jar:/usr/local/ant/lib/ant-starteam.jar:/usr/local/ant/lib/ant-jai.jar:/usr/local/ant/lib/ant-commons-logging.jar:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/ant-apache-oro.jar:/usr/local/ant/lib/ant-apache-bsf.jar:/usr/local/ant/lib/ant-vaj.jar:/usr/local/ant/lib/ant-javamail.jar:/usr/local/ant/lib/ant-swing.jar:/usr/local/ant/lib/ant-jsch.jar:/usr/local/ant/lib/ant-apache-bcel.jar:/usr/local/ant/lib/ant-weblogic.jar:/usr/local/ant/lib/ant-netrexx.jar:/usr/local/ant/lib/ant-xalan1.jar:/usr/local/ant/lib/ant-stylebook.jar:/usr/java/jdk1.5.0_02/lib/tools.jar' [javac] '-sourcepath' [javac] '/home/thufir/java/src/atreides/tidyXhtml' [javac] '-g:none' [javac] [javac] The ' characters around the executable and arguments are [javac] not part of the command. [javac] File to be compiled: [javac] /home/thufir/java/src/atreides/tidyXhtml/Test16.java [javac] /home/thufir/java/src/atreides/tidyXhtml/Test16.java:9: package org.w3c.tidy does not exist [javac] import org.w3c.tidy.Tidy; [javac] ^ [javac] /home/thufir/java/src/atreides/tidyXhtml/Test16.java:42: cannot find symbol [javac] symbol : class Tidy [javac] location: class atreides.xhtml.Test16 [javac] Tidy tidy = new Tidy(); [javac] ^ [javac] /home/thufir/java/src/atreides/tidyXhtml/Test16.java:42: cannot find symbol [javac] symbol : class Tidy [javac] location: class atreides.xhtml.Test16 [javac] Tidy tidy = new Tidy(); [javac] ^ [javac] 3 errors BUILD FAILED /home/thufir/java/build.xml:18: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) Total time: 7 seconds [EMAIL PROTECTED] java]$ cat build.xml <project name="XHTML" default="package"> <import file="properties.tidy.xml" /> <target name="clean"> <delete dir="${outputDir}" /> </target> <target name="prepare" depends="clean"> <mkdir dir="${outputDir}" /> </target> <target name="compile" depends="prepare"> <javac srcdir ="${sourceDir}" destdir ="${outputDir}" classpath ="${includeJar}" /> </target> <target name="package" depends="compile"> <jar jarfile="${outputDir}/${mainClass}.jar" basedir="${outputDir}" > <manifest> <attribute name="Main-Class" value="${pkgPath}${mainClass}"/> </manifest> </jar> </target> </project> [EMAIL PROTECTED] java]$ cat properties.tidy.xml <project name="properties"> <property name="outputDir" value="bin/" /> <property name="sourceDir" value="src/atreides/tidyXhtml/" /> <property name="mainClass" value="Test16" /> <property name="pkgPath" value="atreides.tidyXhtml." /> <property name="user.name" value="thufir" /> <path id="tidy.classpath"> <pathelement path="lib/Tidy.jar" /> </path> </project> -Thufir --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]