ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: HelloWorldSwing.jar
Date Mon, 14 Mar 2005 10:01:16 GMT
> any critique as to my build.xml file?

Yes.
You´re writing a class

    package hello;
    ...
    public class HelloWorldSwing {
    ...

with full qualified name hello.HelloWorldSwing, so it maps to a file
hello/HelloWorldSwing.[class|java].
This relative path must be accessible via your source directory, the class
file is generated into build dir,
the name is what you use for Main-Class.

So change your buildfile:

-        <property name="sourceDir" value="D:\java\src\atreides\hello\" />
+        <property name="sourceDir" value="D:\java\src\atreides\" />

+        <property name="mainClass" value="HelloWorldSwing" />
-        <property name="mainClass" value="hello.HelloWorldSwing" />


Hint: use relative paths instead of absolutes where it is possible. So you
can move your whole project. 

-        <property name="outputDir" value="D:\java\classes\" />
-        <property name="sourceDir" value="D:\java\src\atreides\" />
+        <property name="outputDir" value="classes" />
+        <property name="sourceDir" value="src/atreides" />



Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message