title: How do I get log4J to work - I'm getting "package org.apache.log4j does not exist"
body: <p>i know this may be a newbie qestion, but I'm having issues with setting up Log4J:</p>
  
  <p>I want to run a log4j demo,  and here's my code:</p>
  
  <pre><code>import org.apache.log4j.Logger;
  import org.apache.log4j.BasicConfigurator;
  
  public class HelloLOG4j {
  
    private static final Logger logger = Logger.getLogger(Hello.class);
  
    public static  void main(String argv[]) {
   BasicConfigurator.configure();
   logger.debug("Hello world.");
   logger.info("What a beatiful day.");
    }
  }
  </code></pre>
  
  <p>I set my Classpath:
  C:\Users\Adel\Downloads\apache-log4j-1.2.17\log4j-1.2.17.jar
  in both System and User var's</p>
  
  <p><img src="https://i.stack.imgur.com/XO6lI.png" alt="enter image description here"></p>
  
  <p>But when I run my program I still get</p>
  
  <pre><code>errors found:
  File: C:\Users\Adel\Desktop\various_topics\JavaProjects\HelloLOG4j.java  [line: 2]
  Error: package org.apache.log4j does not exist
  </code></pre>
  
  <p>I know that I set classpath right - if I run cmd line:</p>
  
  <pre><code>C:\Program Files\Java\jdk1.6.0_20&gt;print %LOG4J_HOME%
  C:\Users\Adel\Downloads\apache-log4j-1.2.17\log4j-1.2.17.jar is currently bein
  g printed
  </code></pre>