Return-Path: Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: (qmail 26722 invoked from network); 30 Dec 2010 15:23:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Dec 2010 15:23:40 -0000 Received: (qmail 12548 invoked by uid 500); 30 Dec 2010 15:23:40 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 12301 invoked by uid 500); 30 Dec 2010 15:23:38 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 12287 invoked by uid 99); 30 Dec 2010 15:23:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Dec 2010 15:23:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.212.49] (HELO mail-vw0-f49.google.com) (209.85.212.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Dec 2010 15:23:31 +0000 Received: by vws5 with SMTP id 5so4267020vws.22 for ; Thu, 30 Dec 2010 07:23:10 -0800 (PST) Received: by 10.220.187.69 with SMTP id cv5mr550695vcb.200.1293722589241; Thu, 30 Dec 2010 07:23:09 -0800 (PST) Received: from arigato.home (pool-108-6-2-66.nycmny.fios.verizon.net [108.6.2.66]) by mx.google.com with ESMTPS id e18sm5879572vbm.5.2010.12.30.07.23.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 30 Dec 2010 07:23:08 -0800 (PST) Message-Id: From: Bjorn Roche To: users@felix.apache.org In-Reply-To: <4D1C9691.10304@ungoverned.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: java.lang.NoClassDefFoundError: com/apple/eawt/ApplicationListener Date: Thu, 30 Dec 2010 10:23:06 -0500 References: <4D1A1D67.5010004@ungoverned.org> <4D1A5C7C.3030006@ungoverned.org> <2C2F36DC-F9BB-42CF-BAA1-D73F3904EB0F@xowave.com> <4D1A86FC.2030805@ungoverned.org> <4D1A8845.7070303@ungoverned.org> <591657AE-4DC8-4D05-ADF9-0924DB132D7C@xowave.com> <4D1B3CCB.6070505@ungoverned.org> <4D1C9691.10304@ungoverned.org> X-Mailer: Apple Mail (2.936) On Dec 30, 2010, at 9:26 AM, Richard S. Hall wrote: > On 12/30/10 7:50, Bjorn Roche wrote: >> >> On Dec 29, 2010, at 8:51 AM, Richard S. Hall wrote: >> >>> On 12/29/10 0:20, Bjorn Roche wrote: >>>> >>>> On Dec 28, 2010, at 8:00 PM, Richard S. Hall wrote: >>>>>> >>>>>> Well, resources can be put into packages and shared like >>>>>> classes via exports...or am I missing something? >>>>> >>>>> In this particular example, it looks like the resource is >>>>> contained in the same bundle, so what you are doing is fine >>>>> since it delegates to the bundle's class loader (which is a >>>>> bundle class loader in this), which does the right thing. >>>>> >>>>> From first reading your email, I thought you were talking about >>>>> shared resources...not resources contained in the bundle. >>>>> >>>>> Regardless, resource loading isn't dynamic class loading and >>>>> doesn't involve the TCCL, etc. So, this isn't an advanced use >>>>> case if this is all you are talking about. >>>> >>>> >>>> What I'm trying to do is convert an existing app to a single OSGi >>>> bundle and get it to launch that way. Perhaps the length/ >>>> complexity/poor explanation of my original email gave you the >>>> impression that I was trying to do something more complex, but >>>> that's really all I want to do. >>> >>> It was actually all the talk about class loaders and TCCL that >>> raised a red flag. If all your resources are in your bundle, then >>> you should only need to ask your class' class loader to find a >>> resource. No reason to probe around for other class loaders. >> >> >> I am using the thread context class loader because in a static >> context I have nothing else to go on. It looks something like this: >> >> class A { >> public static final ICON = new ImageIcon( fetch the resource >> data using the TCCL ); >> ... >> } > > What do you mean? If A is in a bundle, then just > A.class.getResource(), no? IIRC, that did not work when I was using wrap and assembly, but it's also possible that I read somewhere not to do that. I am now trying to get your "exploded" bundle suggestion to work... if/when I get that working I'll revisit. bjorn ----------------------------- Bjorn Roche http://www.xonami.com Audio Collaboration --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org