A. Kevin Baynes wrote:

Is it possible to include a JAR inside of an executable JAR and have
the inner JAR's classes automatically added to the classpath?

I think the answer is no. I tried this before and could never make it work. I seem to recall doing some google searching and finding a lot of discussion of this, which all pointed to it not being possible (not automatically anyway but see below).


I see that I can use the Class-Path attribute of the manifest file to reference an extension jar, but it appears to me that the extension jar must be external to the executing jar. I've tried variations on it, but can't get it right.

I also know that I could just unzip the extension JAR's classes and
build them into my executable JAR... Is this my only alternative?

When I was trying to do this, I think the one suggestion I found that seemed workable, was the suggestion to write a custom class-loader just for this purpose. Yes, it would be complicated, but in theory it could be made to work. Just how much work it would be, or whether or not it's already been done and there is code available, I can't say.


HTH,


Phil -- North Carolina - First In Freedom

Free America - Vote Libertarian
www.lp.org


_______________________________________________ Juglist mailing list [email protected] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to