Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 85639 invoked from network); 10 Oct 2009 15:38:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Oct 2009 15:38:42 -0000 Received: (qmail 13781 invoked by uid 500); 10 Oct 2009 15:38:41 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 13708 invoked by uid 500); 10 Oct 2009 15:38:41 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 13698 invoked by uid 99); 10 Oct 2009 15:38:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Oct 2009 15:38:41 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of groodt@gmail.com designates 209.85.220.226 as permitted sender) Received: from [209.85.220.226] (HELO mail-fx0-f226.google.com) (209.85.220.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Oct 2009 15:38:30 +0000 Received: by fxm26 with SMTP id 26so22975203fxm.23 for ; Sat, 10 Oct 2009 08:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=yKDhT1aVJPz7nGONSPM0FDZxIyqYHyochaNmuMOBmIg=; b=dBU5tGJrJPGW/9WSksq46/HGeYkOmG6VC/djpVO7OHRtHjW3lAQ4i97mcQpxH+LaSc ZI3KNJlVwt6xHYAUM4fcSoXlv5AtQCUd9CbXyy24q5a7nupiHAmmJhhKSM5P72GM2Zth 7Na54sy5V5UVV14TOx7nvUBsWHA98MHUOCPvY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=b7dyi+GirysCkFi3r7e3Gjm1MRK8pDmRk1csV/0zbSYp18W4E0tnEyhLhm8m9P4X0y WO0y76zVVW3Qk3LGb02lHMClIAQQzzQfNLPAZ1shTFNvhiZKWNaZDgADNjmCl4L7q8EF hNjbiKOS5rEDxWs4PTvgBYsaAuWusXdejwLlY= MIME-Version: 1.0 Received: by 10.223.5.90 with SMTP id 26mr951268fau.59.1255189090662; Sat, 10 Oct 2009 08:38:10 -0700 (PDT) In-Reply-To: <25835266.post@talk.nabble.com> References: <25835171.post@talk.nabble.com> <519c1a0c0910100830o443b8350ye27713a05ac9a4d4@mail.gmail.com> <25835266.post@talk.nabble.com> Date: Sat, 10 Oct 2009 16:38:10 +0100 Message-ID: <519c1a0c0910100838o6b5ad881w8ebcd6e69512937e@mail.gmail.com> Subject: Re: Unable to run simple java file using Ant From: Greg Roodt To: Ant Users List Content-Type: multipart/alternative; boundary=001517476218dffb3f0475967b89 X-Virus-Checked: Checked by ClamAV on apache.org --001517476218dffb3f0475967b89 Content-Type: text/plain; charset=UTF-8 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 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 > > 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: user-unsubscribe@ant.apache.org > >> For additional commands, e-mail: user-help@ant.apache.org > >> > >> > > > > > > -- > 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: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --001517476218dffb3f0475967b89--