This is on an older version of Beta-9 pulled from CVS...

I have an application that is one java file, a log4j.properties and a
jndi.properties. That all gets compiled into a jar file (My.jar). That jar
plus a number of dependencies are then uberjar'd into a single massive
executable jar.

Now, when I do 'java -jar MyUber.jar' and the code attempts to create a
javax.naming.InitialContext I get a naming exception because it can't find
the jndi.properties even though it is in the root of My.jar.

If I do 'java -classpath list:of:jars my.MainClass' then everything works
correctly.

So, *something* in the classloader isn't playing nice with InitialContext
and jndi.properties. Similarly, my log4j messages aren't as expected
because log4j cannot find log4j.properties either.

Any suggestions? Is anyone else spewing log4j output from an uberjar'd
application?

Thanks,
J


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to