Solved

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

Posted on 2010-09-13
8
1,544 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
Comment Utility
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
Comment Utility
what's the dir eqivalent because i'm running windows, not linux.
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Ah. The error message is showing Unix paths

Just make sure the directory is still writable
0
 

Author Comment

by:davysouthernboy
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
Comment Utility
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
Comment Utility
What was it?
0
 

Author Comment

by:davysouthernboy
Comment Utility
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
Comment Utility
Yes, probably a file lock
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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: …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now