Re: Java packages in eclipse build path

Bernhard Frauendienst <[email protected]> Mon, 14 Jan 2008 01:08:20 +0100
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
I personally use something like the following (in my lib dir):

#!/bin/bash
PACKAGES=commons-logging,log4j
echo -n $(java-config -dp ${PACKAGES}) | xargs -rd: ln -st .


This creates symlinks for all needed jars (and the jars they depend on,
remove java-config's -d parameter if you don't want that) in the current
directory, which you can simply add to the build path in Eclipse.

If someone has a better solution, I'm more than happy to hear it.
Perhaps someone could write a gentoo plugin for Eclipse? ;)

Bernhard

PS: the echo -n is needed because java-config terminates its output with
a newline, which would mess up the symlink to the last listed jar
(because xargs takes \n as a normal character when -d is set to
something different). I couldn't find a more elegant solution so far.

Pascal Flöschel schrieb:
> Hi
> 
> 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.
> 
> Thanks+Bye
> Pascal
-- 
[email protected] mailing list