public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Federico Fissore <federico@fsfe.org>
To: gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] CLASSPATH deprecated?
Date: Fri, 17 Nov 2006 23:57:16 +0100	[thread overview]
Message-ID: <455E3E4C.9080201@fsfe.org> (raw)
In-Reply-To: <455E340C.5070708@yahoo.co.uk>

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



  reply	other threads:[~2006-11-17 22:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-17 22:13 [gentoo-java] CLASSPATH deprecated? Matt Bucknall
2006-11-17 22:57 ` Federico Fissore [this message]
2006-11-18 14:04   ` Matt Bucknall
2006-11-18 14:17     ` Petteri Räty
2006-11-18 15:17       ` Matt Bucknall
2006-11-19  3:57     ` Greg Tassone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=455E3E4C.9080201@fsfe.org \
    --to=federico@fsfe.org \
    --cc=gentoo-java@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox