2

I was writing the code in Netbeans and everything was fine. But Suddenly My computer shutdown. After i open my java source file in Netbeans it doesnot let me edit. The window is gray. For the better clarification i have attached the screenshot below.

Screenshot here

Uddhav P. Gautam
  • 7,362
  • 3
  • 47
  • 64
Chhiring
  • 51
  • 5

1 Answers1

2

This happened because somebody (somehow) changed your file permissions to read-only. You can change the permission to full control.

If you are on Windows : icacls <yourFile> /grant %username%:(r,w,x)

if you are in Linux : chmod a+rwx <yourFile>

or you can recursively do the whole project directory using below command

If you are on Windows : icacls * /grant %username%:(OI)(CI)(r,w,x) /T

Explanation: F = Full Control CI = Container Inherit - This flag indicates that subordinate containers will inherit this ACE. OI = Object Inherit - This flag indicates that subordinate files will inherit the ACE. /T = Apply recursively to existing files and sub-folders. (OI and CI only apply to new files and sub-folders).

If you are on Linux : chmod a+rwx * -R

//R is recursive**

Uddhav P. Gautam
  • 7,362
  • 3
  • 47
  • 64