loading libraries from within a jar file

hi all,

i am working on an application that was developed using jdk 1.4.

the app was packaged in a jar file, which was including also all dependent libraries (such as log4j etc..).

the app was launched by using java -jar, and it has alwasy worked

now i had to rewirte it using java 1.5.. and when i run

java -jar it cannot find log4j (which is embedded in the jar).

after googling etc, all searches i have done pointed to the fact that by running java -jarthe jar files embedded in the jar being run will NOT be on the classpath....

is that true?

how can i make so that java can see jar files embedded in my jar? i want to ship only one jar (even thoguh it's dependent on other libraries..)..

can anyone help me out?

regards

marco

[806 byte] By [king_of_nya] at [2007-11-27 3:15:17]
# 1
hi king,I think u have given the path to read the files in ur code.Instead of giving the path in form of string, use InputStream to read the files. I hope this will help you.
ShivShaktia at 2007-7-12 8:17:49 > top of Java-index,Desktop,Deploying...