Re: Java packages in eclipse build path

[email protected] Sun, 13 Jan 2008 18:59:40 -0500
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
On Jan 13, 2008 6:44 PM, Pascal Flöschel <[email protected]> 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
-- 
[email protected] mailing list