Create a folder in "Program Files" directory of Windows
<p>When my java program is executing it's creating a directory in "<strong>Program Files</strong>". But access denied "<strong>Program Files</strong>" folder to create a folder. According to my knowledge the application is running with current user and it should be executed with Administrator privileges. How can acquire Administrator privileges when creating folder or files via java code ?</p>

<blockquote>
  <p>This is what I have used code and <strong><em>directory_location</em></strong> is as
  follows</p>
  
  <p><em>C:/Program Files/</em></p>
</blockquote>

<pre><code>public int createDirectory(String directory_location) {
        int done = 0;

        try {
            Files.createDirectories(Paths.get(directory_location));
            done = 1;
        } catch (IOException ioEx) {
            Log.getInstance().writeMethodeException(FileSystemConfig.rootFolder, ioEx);
        }
        return done;
    }
</code></pre>