user2521417
user2521417

Reputation: 11

permission error on saving .java file

I installed JDK on my linux mint to learn programming java. One problem I have is the permission error when saving a ".java" file into my Documents folder or any other folder.
When I write a program and try to save it as a ".java" file before compiling, I get an error
permission denied. The file on disk may now be truncated!
why is this happening and how can I prevent this from happening?

I have tried saving into different folders but nothing works. Although I have found that I can save it when I use root permission. The problem with using root, is that I can't compile the file as another error will arise. I later found that I can only compile as user.
How can I stop from going back and forth as root and user?

Upvotes: 1

Views: 1434

Answers (1)

alexakarpov
alexakarpov

Reputation: 1920

can you save any other file in your Documents folder? most likely it has nothing to do with file being *.java. If somehow it's a file system issue, then any file should manifest the same problem. So try saving to any other folder inside your /home/[your username] directory (where you normally have full permissions).

quick googling for this error message seems to indicate a permission problem with your home folder:

http://crunchbang.org/forums/viewtopic.php?pid=317617

so make sure to try other folders, or just the /home/[username] and if it's the same issue, that link should help

Upvotes: 1

Related Questions