Why does it say "Operation Not Supported When Attempted To Save Java Source in Eclipse IDE?

I just implemented a directory watcher and everytime I attempt to save FileListener.java or run the program, i get the following message:

Save could not be completed.

Reason:
Operation not supported for specified element types(s):FileListener.java [in <default> [ in src/com/goodiesdirect/gnfilemonitor [in GNFileMonitor]]]

I don't understand it because FileListener is an interface and all i'm doing is specifying which methods a class must implement when implementing the interface.

package com.goodiesdirect.gnfilemonitor;

import java.io.File;

public interface FileListener {
	
	void fileChanged(File file);
	void newFile(File file);
	
}

Open in new window


Help please.
davysouthernboyAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
Maybe worth looking at the perms on the file itself then. Also, make sure it's not locked by another app
0
 
CEHJCommented:
Please post the result of the following (you should be in the project directory at the command prompt)
ls -ld src/com/goodiesdirect/gnfilemonitor 

Open in new window

0
 
davysouthernboyAuthor Commented:
what's the dir eqivalent because i'm running windows, not linux.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
CEHJCommented:
Ah. The error message is showing Unix paths

Just make sure the directory is still writable
0
 
davysouthernboyAuthor Commented:
It's writable because i can save the other 3 files that are part of the same package... just not that one java source file.
0
 
CEHJCommented:
What was it?
0
 
davysouthernboyAuthor Commented:
I'm not a hundred percent sure. I thought about a process could have a lock on the file and although I wasn't sure what would have a lock on the file, I decided to reboot and see if the problem was resolved.  Upon rebooting, the problem was gone and I figured well, it's a possibility that it was a file lock and decided to give you credit.   An older instance of my java application may have been running and I may not have realized it.  In any event, it's working now and thank you very much for your help.  :)
0
 
CEHJCommented:
Yes, probably a file lock
0
All Courses

From novice to tech pro — start learning today.