Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6378325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:59:25+00:00 2026-05-25T01:59:25+00:00

My log4j is working fine when I run java pakcage.Main from command line, but

  • 0

My log4j is working fine when I run “java pakcage.Main” from command line, but when I run the same program using executable jar like “java -jar myjar.jar” I’m getting the following err:

log4j:WARN No appenders could be found for logger
log4j:WARN Please initialize the log4j system properly

log4j.jar and log4j.properties are threre in my manifest’s Class-Path.

I’m sure it worked properly once, but after rebuild it is not working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:59:26+00:00Added an answer on May 25, 2026 at 1:59 am

    You can only list jar files or directories as part of a classpath. Instead of specifying log4j.properties you should specify the directory that the properties file is in relative to the jar being executed.

    Example:

    If myjar.jar in the base directory, log4j.jar in ./lib/ and log4j.properties in ./conf/

    The Class-Path entry in myjar.jar as follows

    Class-Path: lib/log4j.jar conf/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using log4j in an app I'm developing to eventually run inside Tomcat/JBoss, but
My java application uses log4j for logging. Using ant the project builds successfully, but
I'm using Ivy for project dependency management and it's been working well aside from
I am using hibernate as ORM tool. It's working properly, but the problem is
i have started learning something about log4j as so far its working fine here
I am trying to get log4j working using xml configuration. I have log4j.xml added
I´m using glassfishv3 for few days. But i don´t know how to get log4j
I am working on a java program where I have to call another java
I'm working on a very large java application with log4j, and I was wondering
The current project in wherein I'm working creates a log file using the log4j

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.