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 1GlCer-0002TG-5e for garchives@archives.gentoo.org; Fri, 17 Nov 2006 22:58:05 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kAHMvHuP030473; Fri, 17 Nov 2006 22:57:17 GMT Received: from aa013msr.fastwebnet.it (aa013msr.fastwebnet.it [85.18.95.73]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kAHMvGqG010443 for ; Fri, 17 Nov 2006 22:57:16 GMT Received: from [1.22.65.66] (1.22.65.66) by aa013msr.fastwebnet.it (7.3.105.6) id 452E074A017EA6CB for gentoo-java@lists.gentoo.org; Fri, 17 Nov 2006 23:57:16 +0100 Message-ID: <455E3E4C.9080201@fsfe.org> Date: Fri, 17 Nov 2006 23:57:16 +0100 From: Federico Fissore User-Agent: Thunderbird 1.5.0.8 (X11/20061112) 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> In-Reply-To: <455E340C.5070708@yahoo.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 92e22034-e8cb-4d6f-bb24-7077638e2a92 X-Archives-Hash: 3d3971346717e4d1ba8d315ab5132dd5 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 > -- : Federico Fissore : Blog : http://www.fridrik.it/blog/ : Jabber : federico@jabber.fsfe.org ---------+----------------------------------------------------- [] : "The best thing is when you mix free beer and free [][][] | speech 'cause then you get some really free speech" || : Dick Wall -- gentoo-java@gentoo.org mailing list