Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 90924 invoked from network); 17 Nov 2007 18:05:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Nov 2007 18:05:58 -0000 Received: (qmail 80675 invoked by uid 500); 17 Nov 2007 18:05:45 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 80652 invoked by uid 500); 17 Nov 2007 18:05:45 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 80641 invoked by uid 99); 17 Nov 2007 18:05:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Nov 2007 10:05:45 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Nov 2007 18:05:43 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 3ECACD2DB for ; Sat, 17 Nov 2007 18:05:37 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: derby-commits@db.apache.org Date: Sat, 17 Nov 2007 18:05:37 -0000 Message-ID: <20071117180537.28692.58685@eos.apache.org> Subject: [Db-derby Wiki] Update of "DumpClassFile" by BryanPendleton X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification. The following page has been changed by BryanPendleton: http://wiki.apache.org/db-derby/DumpClassFile New page: To execute various queries, Derby generates Java classes on the fly, then executes that generated code. To study a particular Derby issue, you may find yourself wanting to view that generated code. For example, DERBY-2352 involves understanding what code is generated for various expressions. DERBY-739 is another example. Here's a simple technique that will allow you to view the generated code: * Run Derby with the argument -Dderby.debug.true=DumpClassFile: {{{ java -Dderby.debug.true=DumpClassFile org.apache.derby.tools.ij }}} * Reproduce the problem that you're interested in. * Exit IJ and look in your current directory. You'll see a file like: {{{ ac601a400fx0116x4ec6xd381x00000010e1180.class }}} This is the generated class file for the statement you just ran. * Use a decompiler to transform the generated Java class into source code. I've been successful using "jad". * Now you can read the code! Some other information about generated class files is documented here: http://db.apache.org/derby/javadoc/engine/org/apache/derby/impl/services/bytecode/BCJava.html