• Post Reply Bookmark Topic Watch Topic
  • New Topic

Access is denied  RSS feed

 
VarunS Singh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Why does it showx access denied?
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A suggestion: Do NOT put any of your files in the JDK's folders.   Create your own folders for your source files.
To access the javac.exe file you need to either add the path to the JDK's bin folder to the PATH variable (it looks like you have done that)
or use the full path to the javac.exe file:
C:\Program Files\Java\jdk1.8.0_60\bin\javac.exe -cp .  TestCode23.java

(Access is denied)

That looks like the OS is objecting to having files written to the folder.
 
s ravi chandran
Ranch Hand
Posts: 579
6
Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this is programatic issue.

Looks like you are using windows 8 or windows 10 which has write restrictions when you operate anywhere in C: drive.

You can always create your class in your user space outside system folders.
 
Ivan Pronin
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It appears that you're trying to put your source files in the system C:\Program Fiels\Java\jdk**\bin directory. Try making your own directory for your source files (under your own home directory), instead of putting them in the system path. You probably don't have permissions to write to that directory (but I'm not sure how you got your source files there).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!