ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srinivas2828 <srinivas2...@gmail.com>
Subject Unable to run simple java file using Ant
Date Sat, 10 Oct 2009 15:23:30 GMT

Hi I am trying to use ant to compile and run a simple java file got the
following error
Buildfile: build.xml

clean:
   [delete] Deleting directory
/home/miriyala/Desktop/Roseindia/build/classes
   [delete] Deleting directory /home/miriyala/Desktop/Roseindia/build/jar
   [delete] Deleting directory /home/miriyala/Desktop/Roseindia/build

prepare:
    [mkdir] Created dir: /home/miriyala/Desktop/Roseindia/build
    [mkdir] Created dir: /home/miriyala/Desktop/Roseindia/build/classes
    [mkdir] Created dir: /home/miriyala/Desktop/Roseindia/build/jar

compile:

jar:
      [jar] Building MANIFEST-only jar:
/home/miriyala/Desktop/Roseindia/build/jar/Roseindia.jar

run:
     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
Roseindia
     [java] Caused by: java.lang.ClassNotFoundException: Roseindia
     [java] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java] 	at java.security.AccessController.doPrivileged(Native Method)
     [java] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     [java] 	at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
     [java] 	at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     [java] Could not find the main class: Roseindia. Program will exit.
     [java] Java Result: 1

main:
     [echo] main target completed..

BUILD SUCCESSFUL
Total time: 0 seconds

Here is the build.xml file http://www.nabble.com/file/p25835171/build.xml
build.xml 
thanks in advance
-- 
View this message in context: http://www.nabble.com/Unable-to-run-simple-java-file-using-Ant-tp25835171p25835171.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message