• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jar File dependencies  RSS feed

 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I want to run my program in form of a jar file. I am using log4j in my program. when I try to run my jar it doesnot recognise log4j classes. How can I add my log4j dependency while making jar.

Thansk in advance
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to include the log4j jar file in the classpath in the jar file manifest. See the manifest section of this for more information.
[ December 12, 2007: Message edited by: Joanne Neal ]
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One solution is to unjar ("jar xvf") the Log4J jar, then include all the resulting files in your jar. Don't forget to include any required licenses.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!