Log4j Log is not created when jar file run
===

###This is my Student class that used to test log4j. 

>>><i>

    public class Student{    
    private static final Logger logger = Logger.getLogger(Student.class.getName());   
        public Student() {  
             PropertyConfigurator.configure("log4j.properties");  
        }    
               public static void main(String args[]){  
                          logger.log(Level.INFO, "My log4j Test");    
               } 
    }

</i>


###This is my log4j.properties file 


>>>>>`log4j.rootLogger=INFO,Appender1,Appender2`  
  
>>>>>`log4j.appender.Appender1=org.apache.log4j.ConsoleAppender`  
>>>>>`log4j.appender.Appender2=org.apache.log4j.RollingFileAppender`  
>>>>>`log4j.appender.Appender2.File=C:/Log4j/MyLogExample.log`  
   
>>>>>`log4j.appender.Appender1.layout=org.apache.log4j.PatternLayout`  
>>>>>`log4j.appender.Appender1.Target=System.out`   
>>>>>`log4j.appender.Appender1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n`  
   
>>>>>`log4j.appender.Appender2.layout=org.apache.log4j.PatternLayout`  
>>>>>`log4j.appender.Appender2.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n`  
  
>>>>>`log4j.appender.Appender2.MaxFileSize=50KB`  
>>>>>`log4j.appender.Appender2.MaxBackupIndex=10` 

when i run using eclipes MyLogExample.log file created. then after i created jar file and run using command prompt. but when i run jar file log file is not created. 

in console i can see this error. 

>log4j:ERROR Could not read configuration file [log4j.properties]. 
java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) 


After i add following code example, log file created when jar file run with command prompt. 

>>>>>`PropertyConfigurator.configure("C:\\eclipeworkspace\\Log4jTest\\log4j.properties");`  

<b>How I can give relative path instead of exact path ? </b>


