Access is denied while compiling Java on Windows

后端 未结 7 965
星月不相逢
星月不相逢 2020-12-18 00:30

I created two java files: Pizza.Java and PizzaOrder.Java.

I tried compiling my code using javac in the command prompt like this:

         


        
7条回答
  •  一整个雨季
    2020-12-18 01:15

    The Access Denied error is most likely due to the fact that you're trying to compile this program within the jdk directory, which is inside \Program Files, which is NOT universally writeable by users. You should be doing your coding elsewhere (perhaps in your My Documents directory, or at least somewhere you've got write permissions).

提交回复
热议问题