Gentoo Archives: gentoo-java

From: Bernhard Frauendienst <gentoo.java@×××××××××××××.de>
To: "Pascal Flöschel" <pascal.floeschel@×××.de>
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-java] Java packages in eclipse build path
Date: Mon, 14 Jan 2008 00:08:24
Message-Id: 478AA7F4.6070809@lists.obeliks.de
In Reply to: [gentoo-java] Java packages in eclipse build path by "Pascal Flöschel"
1 I personally use something like the following (in my lib dir):
2
3 #!/bin/bash
4 PACKAGES=commons-logging,log4j
5 echo -n $(java-config -dp ${PACKAGES}) | xargs -rd: ln -st .
6
7
8 This creates symlinks for all needed jars (and the jars they depend on,
9 remove java-config's -d parameter if you don't want that) in the current
10 directory, which you can simply add to the build path in Eclipse.
11
12 If someone has a better solution, I'm more than happy to hear it.
13 Perhaps someone could write a gentoo plugin for Eclipse? ;)
14
15 Bernhard
16
17 PS: the echo -n is needed because java-config terminates its output with
18 a newline, which would mess up the symlink to the last listed jar
19 (because xargs takes \n as a normal character when -d is set to
20 something different). I couldn't find a more elegant solution so far.
21
22 Pascal Flöschel schrieb:
23 > Hi
24 >
25 > Is there a fast and simple way of using the package.env (e.g.
26 > /usr/share/axis-1/package.env ) to add libraries into the eclipse build
27 > path? Manually reading the package.env and adding every jar by hand
28 > takes quite some time.
29 >
30 > Thanks+Bye
31 > Pascal
32 --
33 gentoo-java@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-java] Java packages in eclipse build path Andrew Cowie <andrew@×××××××××××××××××××.com>