Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 42303 invoked from network); 11 Jan 2011 13:00:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jan 2011 13:00:31 -0000 Received: (qmail 82895 invoked by uid 500); 11 Jan 2011 13:00:30 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 82629 invoked by uid 500); 11 Jan 2011 13:00:26 -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 82621 invoked by uid 99); 11 Jan 2011 13:00:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jan 2011 13:00:25 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of antoine@gmx.de designates 213.165.64.23 as permitted sender) Received: from [213.165.64.23] (HELO mail.gmx.net) (213.165.64.23) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 11 Jan 2011 13:00:17 +0000 Received: (qmail invoked by alias); 11 Jan 2011 12:59:56 -0000 Received: from unknown (EHLO [192.168.94.119]) [38.100.172.138] by mail.gmx.net (mp059) with SMTP; 11 Jan 2011 13:59:56 +0100 X-Authenticated: #22961642 X-Provags-ID: V01U2FsdGVkX19fYndFm5Ff7p3B4dnKZ5Wv5uvIHRhhiD731ItKB1 rzuDQ5jIg5Aver Message-ID: <4D2C545F.9080002@gmx.de> Date: Tue, 11 Jan 2011 08:00:15 -0500 From: Antoine Levy-Lambert User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ant Users List Subject: Re: Problems with References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Hello Kevin, what about trying to remove the classpath attribute from the manifest of the jar that you are building ? Also, the manifestclasspath source code tells me that a classpath attribute in a manifest is separated by spaces, not semicolons. Or generate the classpath of your jar using manifestclasspath and remove the nested classpath element on java. Maybe there is an issue in the combination of a nested classpath and of a classpath attribute in the manifest. Regards, Antoine On 1/11/2011 2:26 AM, Kevin Jackson wrote: > Hi all, > > Not sure if this is user error (suspect it's me being dumb) or an > issue in the trunk/HEAD of core. > > My build works on debian, but here I'm stick on XP and for some reason > the classpath is simply not being set > > I'm building a small parser and I'm using antlr. When I compile the > code, the classpath contains antlr-3.3-complete.jar and the > compilation works (so works fine). When I run the code using > , the runtime files with org/antlr/runtime/CharStream not found. > > Exactly the same build + code works fine on debian. The differences > are: debian x64 vs windows xp 32bit, ant version (head compiled today, > vs head compiled last month) and probably update version of java. > > I've tried from in eclipse, from cmd prompt and from powershell, I've > removed the classpath env variable (set by evil quicktime) - all to no > avail. What I don't get is how the classpath works in the antlr and > compile targets but not in the run target. > > It seems like such a simple classpath problem, but I have no idea why > it's not working for the task > > [java] java.lang.NoClassDefFoundError: org/antlr/runtime/CharStream > [java] Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.CharStream > [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > [java] at java.security.AccessController.doPrivileged(Native Method) > [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > [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:248) > [java] Could not find the main class: Test. Program will exit. > [java] Exception in thread "main" > [java] Java Result: 1 > > > Trying it now independently from ant: > > PS C:\workspace\antlr-test> java -classpath > .\lib\antlr-3.3-complete.jar -jar .\build\jar\antlr-test.jar > Exception in thread "main" java.lang.NoClassDefFoundError: > org/antlr/runtime/CharStream > Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.CharStream > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:248) > Could not find the main class: Test. Program will exit. > PS C:\workspace\antlr-test> > > It seems that there is a classpath issue. > > Any help appreciated. > Thanks, > Kev > > --- > xmlns:antlr="antlib:org.apache.tools.ant.antlr"> > > > > > > > > > > > > > > > > > > > > > > > > resource="org/apache/tools/ant/antlr/antlib.xml" > classpathref="base.path"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > input="${test-file}"> > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org