title: Use IResource.refreshLocal() in Java Application
body: <p>I want to use IResource.refreshLocal() in my Java application to programmatically refresh a new compile file. The file is not created by eclipse API and I must refresh file or project to let eclipse have access to that. </p>
  
  <p>As first solution I active "Referesh using native hooks or pooling" in eclipse, but it is not working when new files are created very fast.</p>
  
  <p>As second solution I used this piece of code:</p>
  
  <pre><code>IResource dfile = ResourcesPlugin.getWorkspace().getRoot().getFile("PathToMyFile");
  dfile.refreshLocal(IResource.DEPTH_ZERO, null);
  </code></pre>
  
  <p>I also add two Jar files "org.eclipse.core.resources.jar" and "org.eclipse.core.runtime.jar" to the application. </p>
  
  <p>However, still there is a compiler error:</p>
  
  <pre><code>The type org.eclipse.core.runtime.IAdaptable cannot be resolved. It is indirectly referenced from required .class files.
  </code></pre>
  
  <p>I guess I should define dependency between these two jar files. I find pages how to add dependency in a plugin. However, my program is not a plugin, and I do not know how to do that. 
  Please let me know if anyone knows the problem. If the problem is about defining dependency between jar files, please let me know how to define that in a Java application.</p>