you can fix it by right-clicking on application project and setting java build path in properties properly
Unless it is a Web Application. Then the log4j.jar file needs to be in the WEB-INF/lib directory, The EAR app directory, or the server classpath. Putting it in the java build path will only help at compilation for Web projects. For java projects it works at both compile and run time.