Re: Access jar files in a library directory in the jar file

2013-06-18 Thread Bruce Atherton
Oops. I meant Rob, of course. On 18/06/2013 4:34 PM, Bruce Atherton wrote: You are right that it is inefficient, but it is easy to understand. If you want to get efficient, you could create the main.jar with inclusions of [1] using the src attribute for the other jars. As for the manifest, wh

Re: Access jar files in a library directory in the jar file

2013-06-18 Thread Bruce Atherton
You are right that it is inefficient, but it is easy to understand. If you want to get efficient, you could create the main.jar with inclusions of [1] using the src attribute for the other jars. As for the manifest, while this would be tricky for a general purpose jar merging tool, it isn't a

Re: Access jar files in a library directory in the jar file

2013-06-18 Thread Rob Seegel
Rob, There are various open source solutions out there to do what you're looking for, but there is no "built-in" way to do what you want to do using plain Java. I saw someone else suggest one-jar which is what I would have suggested, too. There is another one called Meta Jar that basically

Re: Access jar files in a library directory in the jar file

2013-06-18 Thread Earl Hood
On Tue, Jun 18, 2013 at 11:54 AM, Bruce Atherton wrote: > It is fairly trivial to do. In your main jar target: > > 1. create a temporary directory > 2. run the unjar task > 3. jar up your main jar, including the contents of the temporary > directory > 4. delete the temporary directo

Re: Access jar files in a library directory in the jar file

2013-06-18 Thread Bruce Atherton
It is fairly trivial to do. In your main jar target: 1. create a temporary directory 2. run the unjar task 3. jar up your main jar, including the contents of the temporary directory 4. delete the temporary directory See http://ant.apache.org/manual/Tasks/unzip.html for docs on

Re: Access jar files in a library directory in the jar file

2013-06-18 Thread Rob Tanner
In that case, is there an ant task that will enable me to explode the jar file and add the classes that way. I could simply explode the jars in my development hierarchy in Eclipse, but I would rather leave them untouched there and only explode them when I build the main jar file. I looked in t

Re: Access jar files in a library directory in the jar file

2013-06-17 Thread Raja Nagendra Kumar
Hi, http://docs.oracle.com/javase/tutorial/deployment/jar/downman.html If you want to load classes in MyUtils.jar into the class path for use in MyJar.jar. These two JAR files are in the same directory and can't be packaged within MyJar.jar Regards

Re: Access jar files in a library directory in the jar file

2013-06-17 Thread Joe Attardi
Hi Rob, I don't think you can have JAR files inside the JAR file like that. On Mon, Jun 17, 2013 at 6:38 PM, Rob Tanner wrote: > Hi, > > I'm trying to build a runnable jar file that includes several libraries > that are also jar files. My problem is that Java does not seem to be able > to fin

Re: Access jar files in a library directory in the jar file

2013-06-17 Thread Vimil Saju
The JVM won't look into nested jar files for classes.  Eclipse has a FatJar feature that lets you create runnable jars with nested jars within it. for ant I think you can use one-jar. Here is a link  http://one-jar.sourceforge.net/ From: Rob Tanner To: user@ant