wood burning stoves*
The moose likes IDEs, Version Control and other tools and the fly likes .classpath is read only Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark ".classpath is read only" Watch ".classpath is read only" New topic
Author

.classpath is read only

N Tiwa
Greenhorn

Joined: Aug 23, 2010
Posts: 14
Hi,

I am trying to add a external class folder to my existing project. When I try to do that I get this error .classpath is read only . I tried looking around for solutions and in most places I found that may be the eclipse_classpath.xml is read only. I was syncing this original project from a version control system and then trying to add another folder from the version control system as well. I first checked out the classpath file and change the file permission from read only to writable. Then when I imported this in eclipse and try to add an external folder by going under configure build path I get the error saying .classpath is read only. After that I went in eclipse to check the permission on the file. I see that read only flag was disable which looks fine to me. I do see 2 other options there one is Archive and other one is Derived that are unchecked as well. I am not sure what am I doing wrong here? Can someone please advice.

Thanks in advance!!!
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

.classpath is built by Eclipse when you change the Project Build Path.

for example each developer may have their own workspace etc., so .classpath should not be in version control! (like target)

You should not be tweaking this file manually!

Also, it could be read-only due to version control checkout or other issues.

WP
N Tiwa
Greenhorn

Joined: Aug 23, 2010
Posts: 14
Hi,

Thanks for your reply. I did copy the whole project separately and again it has the same issues. Any suggestions??

Thanks in advance!
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

Even if you copied everything, you may still have the .classpath set to "read-only".

Set the attributes to read-write, then Eclipse will update it when you change the classpath.

Again be careful if you commit that file back to source control! (Which should be ignored anyway)

WP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: .classpath is read only
 
Similar Threads
Error while adding an external archieve
what all to keep in version control?
Problems with security policies for Axis2 in Tomcat
Eclipse: What, exactly, does the "Add External Class Folder" button really do?
Error : class not found exception : com.mysql.jdbc.driver in eclipse Tool