Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 21253 invoked from network); 6 Apr 2004 21:13:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 Apr 2004 21:13:13 -0000 Received: (qmail 49976 invoked by uid 500); 6 Apr 2004 21:12:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 49940 invoked by uid 500); 6 Apr 2004 21:12:50 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 49927 invoked from network); 6 Apr 2004 21:12:50 -0000 Received: from unknown (HELO web20411.mail.yahoo.com) (216.136.227.62) by daedalus.apache.org with SMTP; 6 Apr 2004 21:12:50 -0000 Message-ID: <20040406211257.55813.qmail@web20411.mail.yahoo.com> Received: from [208.128.243.99] by web20411.mail.yahoo.com via HTTP; Tue, 06 Apr 2004 14:12:57 PDT Date: Tue, 6 Apr 2004 14:12:57 -0700 (PDT) From: Matt Benson Subject: Re: 'java' ant task not displaying debug info To: Ant Users List In-Reply-To: <903C87C28947694399E9C7B81321727525DFF3@ulsexchsf.corp.ualloyalty.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I actually meant to respond to your first query... This is probably the JIT. You're already forking the JVM, but try to add a -Matt --- Greg Wolfe wrote: > I've posted on this before, but got no response so > I've devised a simple test case that demonstrates > the problem. > > When I compile with the 'javac' task in ant with > 'debug' set to true, debug information is in the > class file which is produced. I can verify this by > running 'java' from the command line. However, when > I run the 'java' ant task, debug information is not > shown. I'm running ant version 1.5.2-23 > > I would appreciate it if people can try out this > program and report if they get the same result. > > Thanks, > -Greg Wolfe > > ---- > running from ant: > > $ ant > Buildfile: build.xml > > init: > [mkdir] Created dir: > /home/gwolfe/msrc/emp/sample/build > > build: > [javac] Compiling 1 source file to > /home/gwolfe/msrc/emp/sample/build > > run: > [java] Example String > [java] Exception in thread "main" > java.lang.Exception: This exception should log the > line number > [java] at Example.main(java.lang.String[]) > (Unknown Source) > [java] Java Result: 1 > > BUILD SUCCESSFUL > Total time: 0 seconds > > > ==> note the "Unknown Source" in the output. > > running java from the commandline: > $ cd build; java Example; cd .. > Example String > Exception in thread "main" java.lang.Exception: This > exception should log the line number > at Example.main(Example.java:15) > > ==> note that debug information is available > > > --- > src/Example.java: > /** > * Demo program to check if debug is enabled > * @author Greg Wolfe > */ > > > public class Example { > public Example(String message) { > this._message = message; > } > > > public String getMessage() { > return _message; > } > public static void main(String[] args) throws > Exception { > System.out.println(new Example("Example > String").getMessage()); > throw new Exception("This exception should > log the line number"); > } > > > private String _message; > } > > > > build.xml: > basedir="."> > > Demonstrate the lack of debug information in a > case where it > should be present. > > > > > > > > > > > > > > > > > > > > description="compile the source "> > srcdir="${src}" destdir="${build}" > > > > > > > > > > description="run the compiled code"> > > > > > > > > > > > > > > > > > > > > > __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org