| Author |
packing java file into JAr file
|
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
|
I have a java class file and its supporting jar files and want to pack it JAR,how It can be done.I read that ,packing jar inside a jar create problem
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
|
Packing a jar into a jar doesn't cause a problem, per se; but the Java class loader won't know how to load classes from those "nested jars", so it won't accomplish anything useful, either.
|
[Jess in Action][AskingGoodQuestions]
|
 |
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
|
then please tell how it can be done??
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Distribute your library JAR files next to your program JAR file:
The manifest can then specify those JAR files in the Class-Path attribute:
Of course you should put all your library JAR files either in the same folder, or all in a subfolder like lib. That's just more consistent.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: packing java file into JAr file
|
|
|