No Roeseindia not in ubder src folder and should i need to place or using ant means build.xml file we can? and source file is called Roseindia.java and here is the source file http://www.nabble.com/file/p25835392/Roseindia.java Roseindia.java
cuberoot wrote: > > Looks like nothing is being compiled. > > Is your Java source code under ./src? Is your Java file called > Roseindia.java? Does Roseindia have no package and does it have a > correctly > defined main method? > > > On Sat, Oct 10, 2009 at 4:33 PM, srinivas2828 > <[email protected]>wrote: > >> >> thanks for your reply >> Exactly, only Manifest file and there is no class file in classes >> directory >> also why is it so? >> >> cuberoot wrote: >> > >> > Looks like your jar is only created with the manifest and no compiled >> > Class >> > files. Can you confirm if there are any Class files in the jar? Does >> the >> > code compile successfully into ./build/classes? >> > >> > >> > On Sat, Oct 10, 2009 at 4:23 PM, srinivas2828 >> > <[email protected]>wrote: >> > >> >> >> >> 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: [email protected] >> >> For additional commands, e-mail: [email protected] >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Unable-to-run-simple-java-file-using-Ant-tp25835171p25835266.html >> Sent from the Ant - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > -- View this message in context: http://www.nabble.com/Unable-to-run-simple-java-file-using-Ant-tp25835171p25835392.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
