Solved

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

Posted on 2010-09-13
8
1,587 Views
Last Modified: 2013-12-29
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.
0
Comment
Question by:davysouthernboy
  • 5
  • 3
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 33663950
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
 

Author Comment

by:davysouthernboy
ID: 33663974
what's the dir eqivalent because i'm running windows, not linux.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 33664023
Ah. The error message is showing Unix paths

Just make sure the directory is still writable
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:davysouthernboy
ID: 33664080
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
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 33664131
Maybe worth looking at the perms on the file itself then. Also, make sure it's not locked by another app
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 33665042
What was it?
0
 

Author Comment

by:davysouthernboy
ID: 33665090
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 33665145
Yes, probably a file lock
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to parse custom JSON to POJO java 4 73
more than one jdk and one jre 1 41
servlet example issue 6 39
Which non-HTML GUI front end to use with Java? 3 22
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question