ant « class file « Java I/O Q&A

1. how to automatically remove relative class file once delete a java source file?

when i delete a souce file, rebuild the source file use javac task, the class file Test.class wont be remove automatically. is there any workaround?

2. Java Manifest file's class path and how it determines relative dirs

How does the Class-path in the MANIFEST.MF file determine the relative location? 1) Say I have a JAR with a jar inside lib/somejar.jar and ofc the manifest file is inside META-INF/MANIFEST.MF. How would ...

3. executing a java class file from ant script

I need to run a java class (actually a test case) from ant script. Is it possible to do so?

4. Cleaning up stale .class files using Apache Ant

How do I clean up stale .class files out of ${workdir} given set of existing .java files in ${srcdir}? By stale I mean .class files that were generated from now removed ...

5. creating javadoc with ant for only the dependent classes of a given class (java file)

I want to create javadoc with ant from a java source file and just from the dependent classes of this file. These are in a java project, but i don't need ...

6. How can I make an Ant Javadoc class exclude two files?

I am documenting some Java webservices and the supporting datatypes. There are two services that I do not want documented. What is the correct way to exclude a small number of ...

7. Ant scripting creating 2 class files

I am not sure If I am asking a very simple question but I have a project in which the developer has used "XSD" files to create java source codes. The ...

8. 'Could not find the main class error' in a build file

I have craated a Java application with an Ant build file containing the jar-task task that generate a jar file from the application.

<target name="jar-task" depends="compile">
    <mkdir dir="${jar.dir}"/>

9. Ant built does not generate class files

I'm using build.xml to build my src. However it failed to generate class files without any error message. The full script is

<?xml version="1.0"?>

<project name="auxiliary" basedir="." default="dist">

<property name="src.dir" value="../auxiliary-src/com/nextbio/drugbank"/>
<property name="dist.dir" value="dist"/>
<property name="lib.dir" ...