public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Bernhard Frauendienst <gentoo.java@lists.obeliks.de>
To: "Pascal Flöschel" <pascal.floeschel@gmx.de>
Cc: gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] Java packages in eclipse build path
Date: Mon, 14 Jan 2008 03:56:12 +0100	[thread overview]
Message-ID: <478ACF4C.2020207@lists.obeliks.de> (raw)
In-Reply-To: <478ABAA7.70701@gmx.de>

You will still need the deps on the classpath for running the program
though, so you need to integrate those too, somehow... no idea how the
Run configurations are stored in Eclipse, but those might be the right
place to add the entries.

Pascal Flöschel schrieb:
> jieryn@gmail.com schrieb:
> | On Jan 13, 2008 6:44 PM, Pascal Flöschel <pascal.floeschel@gmx.de> wrote:
> |> Is there a fast and simple way of using the package.env (e.g.
> |> /usr/share/axis-1/package.env ) to add libraries into the eclipse build
> |> path? Manually reading the package.env and adding every jar by hand
> |> takes quite some time.
> |
> | I do stuff like this quite a bit, java-config is simple but great tool
> | to learn. You can add the output of the following scriptlet to your
> | .classpath file inside your project.
> |
> | I use something like this for many purposes,
> |
> | #!/bin/bash
> |
> | for pkg in $(java-config --list-available-packages | sort | perl -pi
> | -e 's/^\[(.*?)].*/$1/g')
> |   do
> |     echo -n "<classpathentry kind=\"lib\"
> path=\"/usr/share/$pkg/lib/$pkg.jar\""
> |     echo    " sourcepath=\"/usr/share/$pkg/sources/$pkg-src.zip\"/>"
> |   done
> |
> | -jesse
> |
> Thank you and very much. My bash and sed skills are very low. However I
> tried to combine your idea with Bernhard's and now got the following
> script:
> 
> #!/bin/bash
> ## Packages to add
> ## "java-confid -d for dependencies"
> 
> PACKAGES=axis-1,wsdl4j
> 
> for pkg in $(java-config -p ${PACKAGES} | perl -pi -e 's/[:*]/$1\n/g')
> ~  do
> ~    echo "<classpathentry kind=\"lib\" path=\"$pkg\" />"
> ~  done
-- 
gentoo-java@lists.gentoo.org mailing list



  reply	other threads:[~2008-01-14  2:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-13 23:44 [gentoo-java] Java packages in eclipse build path Pascal Flöschel
2008-01-13 23:59 ` jieryn
2008-01-14  1:28   ` Pascal Flöschel
2008-01-14  2:56     ` Bernhard Frauendienst [this message]
2008-01-14  0:08 ` Bernhard Frauendienst
2008-01-14  6:45   ` Andrew Cowie

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=478ACF4C.2020207@lists.obeliks.de \
    --to=gentoo.java@lists.obeliks.de \
    --cc=gentoo-java@lists.gentoo.org \
    --cc=pascal.floeschel@gmx.de \
    /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