Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while adding an external archieve

 
raju sangam
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm working with Eclipse3.2.
When I am trying to add external files to my application. It gives error.
Reason: File/myappln/.classpath is read-only.

can any body resolve this issue would be appreciate.

Thanks in Advance,
Sangam
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The .classpath file is created by eclipse and is used to keep track of the classpath needed to build your project in eclipse. Adding external files to a project tells eclipse it needs to add new entries to the classpath, and if the .classpath file *is* read-only, then eclipse can't write these new entries to the .classpath file.

The solution, change .classpath not to be read only. You can do this either through your OS, or through eclipse itself (but you'll have to open resource perspective, because .classpath is filtered out of the file-list by default in the Java view - Window -> Open Perspective -> Other... -> Resource -> OK; Right click the .classpath file in the Navigator tab -> Properties -> Uncheck "Read Only" -> OK).

Or there may be other reasons why .classpath is read only... was this project checked out from a version control system? If so, you need to "check out" the .classpath file first to allow your version control system to change it from "read only".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic