From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GlQoR-0004WK-U7 for garchives@archives.gentoo.org; Sat, 18 Nov 2006 14:04:56 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kAIE4EFc000018; Sat, 18 Nov 2006 14:04:14 GMT Received: from smtp010.mail.ukl.yahoo.com (smtp010.mail.ukl.yahoo.com [217.12.11.79]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kAIE4EP6031090 for ; Sat, 18 Nov 2006 14:04:14 GMT Received: (qmail 88882 invoked from network); 18 Nov 2006 14:04:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-YMail-OSG:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=TJ740kXOPEsmsH0PLtwnRBttxCRDaRqcl81lN1LrkY5HhRleGWhrY26jTVaJwmU65AWryYeNa4x+dmeRsKlep5n4+GFaSaHoKM7BNv6ZykYfe389BKjqmv7QLJrJgOpxAx9RDzSULfSABpxvvaXWSS4aXoDb9sRNlzdiHqaJhxU= ; Received: from unknown (HELO ?192.168.1.101?) (matt_bucknall@82.34.113.129 with plain) by smtp010.mail.ukl.yahoo.com with SMTP; 18 Nov 2006 14:04:14 -0000 X-YMail-OSG: Wg_y1KEVM1nmYAtvcy1rvKTzCfSOD49oxDyQkq7OozjztEyEsolgHgueoFmr1m9dGcC06iMUWwBtv1mIfDTiPkxjjvpHfrLW7e8gFOzOomFBYxQ2QeDYevakGefPWArMEeWbmANF5POccReTIJmiBuy5ICEf0mKO Message-ID: <455F1301.8020600@yahoo.co.uk> Date: Sat, 18 Nov 2006 14:04:49 +0000 From: Matt Bucknall User-Agent: Thunderbird 1.5.0.7 (X11/20061021) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: gentoo-java@lists.gentoo.org Subject: Re: [gentoo-java] CLASSPATH deprecated? References: <455E340C.5070708@yahoo.co.uk> <455E3E4C.9080201@fsfe.org> In-Reply-To: <455E3E4C.9080201@fsfe.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: a4a3daf1-fda6-4c6a-859e-42829bbef940 X-Archives-Hash: c36ae374ec49eb1a3039e70fdfa4d2c4 Hi Federico, Thanks for your reply. My understanding is that java-config is specific to Gentoo. I assume then, there is no cross-platform means of finding out whether/where libraries are installed automatically (i.e. for use by some installation process). Is it normal practice when deploying a Java application to include all the JARs that it needs so not to rely on the end-user having some packages already pre-installed? Thanks again, Matt. Federico Fissore wrote: > There are mainly two ways to do this: > > 1. use a "static" classpath in the form > create symlinks to system installed jars and then run something like > CLASSPATH="lib/commons-logging.jar:lib/commons-collections.jar" > java MyApp > 2. ask java-config to do that for you > CLASSPATH=$(java-config -dp commons-beanutils-1.6) java MyApp > > My preference goes to the first way when packaging an application (if > the application expects some jars in some folder) and to the second > way when I run my own application (obvioulsy backed by a shell script: > I hate writing the same stuff twice) > > Matt Bucknall wrote: >> Hello, >> >> In section 6 of the Gentoo Java Guide, it mentions that setting a >> system-wide CLASSPATH should be considered deprecated because >> applications should manage their own classpaths. This makes sense, but I >> am wondering, how are applications expected to do this? If an >> application needs to make use of a 3rd party JAR, does it have to >> include it as part of its own installation so it knows which version it >> is, and where it is located, or is there some less brute-force automated >> means for an application to locate installed libraries? >> >> Thanks, >> >> Matt. >> >> Send instant messages to your online friends >> http://uk.messenger.yahoo.com > Send instant messages to your online friends http://uk.messenger.yahoo.com -- gentoo-java@gentoo.org mailing list