title: Can't configure logging for executable jar
body: <p>This is similar to this other <a href="https://stackoverflow.com/questions/10370989/how-to-configure-logging-when-running-a-jar">question</a>, although I already put the <code>logging.properties</code> in the executable jar and doesn't work.</p>
  
  <p>I have a class (ReportGenerator) that has the following: </p>
  
  <pre><code> Logger logger = Logger.getLogger(ReportGenerator.class.getName());
   logger.log(Level.INFO, "LOG THIS");  
  </code></pre>
  
  <p>I'm using Netbeans so I put the <code>logging.properties</code> file in the path <code>src/main/resources</code>. It has this (among other things):</p>
  
  <pre><code># default file output is in user's home directory.
  java.util.logging.FileHandler.pattern = /my/folder/reports.log
  java.util.logging.FileHandler.limit = 50000
  java.util.logging.FileHandler.count = 10
  java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
  
  # Limit the message that are printed on the console to INFO and above.
  java.util.logging.ConsoleHandler.level = OFF
  java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
  
  
  ############################################################
  # Facility specific properties.
  # Provides extra control for each logger.
  ############################################################
  
  # For example, set the com.xyz.foo logger to only log SEVERE
  # messages:
  com.mypackage.ReportGenerator.level = ALL
  </code></pre>
  
  <p>The jar is generated using Maven, when decompressed I can see that the <code>logging.properties</code> is in the main folder of the jar. Along with the folder <code>com</code> where my class is.</p>
  
  <pre><code>-com
    -mypackage
        -ReportGenerator
  logging.properties
  ...other things
  </code></pre>
  
  <p>When I run from console:</p>
  
  <pre><code>java - jar MyReportsJar.jar
  </code></pre>
  
  <p>It shows me the logs through the console. I want to log it to the file I set in the <code>logging.properties.</code> </p>
  
  <p>What am I doing wrong?
  How do I do it without setting the JVM <code>java.util.logging.config.file</code> param?</p>