Return-Path: Delivered-To: apmail-buildr-users-archive@www.apache.org Received: (qmail 75784 invoked from network); 8 Oct 2010 14:17:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Oct 2010 14:17:41 -0000 Received: (qmail 47808 invoked by uid 500); 8 Oct 2010 14:17:41 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 47690 invoked by uid 500); 8 Oct 2010 14:17:41 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Received: (qmail 47682 invoked by uid 99); 8 Oct 2010 14:17:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 14:17:41 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex.boisvert@gmail.com designates 209.85.216.44 as permitted sender) Received: from [209.85.216.44] (HELO mail-qw0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 14:17:35 +0000 Received: by qwc9 with SMTP id 9so378950qwc.17 for ; Fri, 08 Oct 2010 07:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=zVQuaqWKxwHt4xeI7DgKPVR1iT4eSP41j/NJnS6r+bQ=; b=t/peRShnKUcOTsNJH6lxjWpmSgKuc47LpHseWVZokXmHaNRXKXi35KnH552FSXfhoJ 3Jp5HrzeRvo7Q4o2Pj/TLqh1z6VruU7YI9s7/Kso79J1qtFpli5XvRG9qQwZyqlHYwh9 BLUivVH5l8nrrTr2Kvf4LdBNAox/jQHm/75ME= 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=eRCfiyZvkEcpRkXeY/X+DjEH2yAu+JQAOlJ/hM2IUJCqBwVO2GTEalKDaOFiuPgS5/ 2ZviLUWQeVUIIJioFkLJaiUx1P2fvPBxLjrmiIKBCKKDqRhwvI0ZDEL1pqdK6jXBK36s 18bDL/fanfGeVbQ9O4TzDMe+TCStjeCxDpWKE= MIME-Version: 1.0 Received: by 10.224.208.130 with SMTP id gc2mr1593115qab.69.1286547419880; Fri, 08 Oct 2010 07:16:59 -0700 (PDT) Received: by 10.229.114.209 with HTTP; Fri, 8 Oct 2010 07:16:59 -0700 (PDT) In-Reply-To: <24C7E817-92D5-47D9-96CD-BB913546956B@ebrary.com> References: <96ECD326-AAF3-4D2E-B089-15FB4F1B2DC6@ebrary.com> <24C7E817-92D5-47D9-96CD-BB913546956B@ebrary.com> Date: Fri, 8 Oct 2010 07:16:59 -0700 Message-ID: Subject: Re: Good stuff in Java classpath From: Alex Boisvert To: users@buildr.apache.org Content-Type: multipart/alternative; boundary=20cf300fa9cff2e15104921ba9d3 X-Virus-Checked: Checked by ClamAV on apache.org --20cf300fa9cff2e15104921ba9d3 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Oct 7, 2010 at 7:01 PM, Ed Smiley wrote: > I found a workaround. :) > Good to hear! > You can stuff the jars that will be packaged into Java.classpath EVEN if > they don't exist (yet). > > When they DO exist, and you are checking a release or running tests, the > classpath becomes correct and it works. > It doesn't seem to have any other ill effects. Not sure why Java.classpath > needs to be set so early in the game. Is that a design flaw? > It's a design limitation, yes. First, it's due to how the JVM works with a static classpath set on startup. RJB does no magic here, it simply starts an embedded JVM and passes it the defined classpath before a Java class is invoke from Ruby. The semi-good-news: The latest version of RJB (1.2.9) now creates a new URLClassLoader right on top of the system classloader and allows new classpath elements to be added at runtime. This helps although it introduces some fragility with an additional classloader (some libraries assume/want to be in the system classloader). However, I had some issues with RJB 1.2.9 when I tried it out so I backed out the change and pushed the upgrade to later. We'll need to do some debugging before upgrading. alex --20cf300fa9cff2e15104921ba9d3--