Search code examples
javaeclipseworkspace

Refresh folder dynamically at runtime


How can I refresh project folder dynamically at runtime using java program. Actually I created the java file dynamically and I have read the created java file at the same time. But it shows class not found exception. when I refresh the project folder once, its working properly. Is there is any way to refresh folder dynamically . I have tried

  • eclipse --> window --> preferences --> general --> workspace

    and enable Refresh automatically. but I need it dynamically.Kindly help me .


Solution

  • I have a program that does similar. I would suggest possibly checking to see if it exists and/or creating a new File object to correspond to the file you added.