Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #19549
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2012-10-28 09:44 -0700 |
| References | <c34600e7-78d9-44a5-a79c-ee804ed992e2@googlegroups.com> <af2agsFbm4U1@mid.dfncis.de> |
| Message-ID | <c68ab307-b1ec-4aff-84f9-f1e66a1cddcd@googlegroups.com> (permalink) |
| Subject | Re: a question about creating the JAR file |
| From | Lew <lewbloch@gmail.com> |
Sven Köhler wrote: > There are at least two ways of doing this: > > 1) create hello.jar (for example with ant) and embed a manifest file, > which includes helper.jar in the classpath. The good thing is: inside > the manifest, you can use relative paths. Doring java -jar hello.jar, > these paths will be resolved (AFAIK, relative to hello.jar) "AFAIK" transforms to "It is thus" when you read the docs. It would not make any sense to use absolute paths in the manifest. > 2) unpack helper.jar, and include (almost) all files of helper.jar in > hello.jar. Now it's not always possible to do that, especially if you > have multiple JAR files. Some paths are reserved. For example, if you > create a StAX XML Reader, the API search the classpaths for certain > failes. Each files may contain the names of classes that implement the > StAX API. Now when you merge multiple JAR files, you would have to merge > these files as well. (This is actually a bad example, as you only want > only one StAX implementation anyways, but it illustrates the problem) It illustrates _a_ problem; I wouldn't call it _the_ problem. The problem is that it's a stupid idea. You destroy the purpose of JARs, you tangle up code from multiple sources into a single vehicle, you violate copyright and licensing terms, you make it more difficult to update third-party JARs, and there's absolutely no need for it. > What about signed JARs? > > Now method (2) has gained popularity. Probably, because "big fat JAR > plugins" for several IDEs exist (at least for Eclipse this is true). That's a result of bundling third-party JAR contents inappropriately? > However, I think this method should be avoided for any big application. Drop the word "big" and you have good advice. -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
a question about creating the JAR file zyng <xsli2@yahoo.com> - 2012-10-26 13:58 -0700
Re: a question about creating the JAR file Lew <lewbloch@gmail.com> - 2012-10-26 14:14 -0700
Re: a question about creating the JAR file zyng <xsli2@yahoo.com> - 2012-10-31 12:41 -0700
Re: a question about creating the JAR file Lew <lewbloch@gmail.com> - 2012-10-31 15:19 -0700
Re: a question about creating the JAR file Sven Köhler <remove-sven.koehler@gmail.com> - 2012-10-27 16:54 +0200
Re: a question about creating the JAR file Jan Burse <janburse@fastmail.fm> - 2012-10-27 17:20 +0200
Re: a question about creating the JAR file Jan Burse <janburse@fastmail.fm> - 2012-10-27 17:24 +0200
Re: a question about creating the JAR file Sven Köhler <remove-sven.koehler@gmail.com> - 2012-10-27 19:06 +0200
Re: a question about creating the JAR file Lew <lewbloch@gmail.com> - 2012-10-28 09:44 -0700
Re: a question about creating the JAR file Roedy Green <see_website@mindprod.com.invalid> - 2012-11-01 18:26 -0700
csiph-web