Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

"access denied" to create class file  RSS feed

 
Rabinarayan jena
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to java. While compiling the "moooooo" program an error is displayed.
Error--
error while writing MooseGreetings :MooseGreetings.class
<acess denied>.

What to do?
 
Campbell Ritchie
Marshal
Posts: 56534
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Which folder are you trying to create the Mooooo file in? I suggest you create your own java (or similar) folder with the mkdir command. More details in this post. You can use the same instructions on Windows and Linux.
 
Rabinarayan jena
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created another folder named java source in program files with in c drive. I have set the path also in the environment setting . But still getting the problem relating to class.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using Windows? I thought Windows doesn't have folder permissions like *nix.

Try compiling to the same folder as the source.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Windows has restrictive file permissions if you aren't running as an administrator level account. If you are using an employer provided computer, your account may be a limited-user account.
 
Steve Kedzie
Greenhorn
Posts: 22
Mac Netbeans IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recommend you create your java programs folder somewhere else other than within "Program Files." Even with Administrator privileges, you will not have full control of that folder unless you go through a process to take ownership and fix permissions. To keep things simple, you should just create a folder directly on the C:\ drive and set your PATH and CLASSPATH to that folder. Once you know you can get everything working, then you could consider finding a better hierarchy to suit your needs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!