compile -- permission denied



Hi all,
I was trying to compile my java files and got the message below. I
didn't understand the message, "Permission denied", but I just tried
again as a root. Then, I was able to compile.

I'd like to understand why this happens.
I am using Java 1.5 and Fedora core 4.

-------------------------------------------------
[jonghook@localhost Research]$ javac Main.java
Main.java:18: error while writing Main: Main.class (Permission denied)
public class Main {
^
1 error
[jonghook@localhost Research]$ sudo javac Main.java
Password:
[jonghook@localhost Research]$
----------------------------------------------------

.



Relevant Pages

  • Re: NetBeans and JCreator
    ... It just simple does not give me the option to compile or run the .java file. ... I can run the .class file from command line fine. ... NetBeans and he can compile/run my .java code. ... NetBeans generally does not have trouble with .java files that come from ...
    (comp.lang.java.programmer)
  • Ant Help
    ... Java source files to compile. ... Only Java files that have no ... How can we make Ant to compile only the source file in that have ...
    (comp.lang.java.programmer)
  • compile -- permission denied
    ... I was trying to compile my java files and got the message below. ... $ sudo javac Main.java ... Prev by Date: ...
    (comp.lang.java.help)
  • Re: NetBeans and JCreator
    ... I have a Window Application program that I wrote using JCreator Pro 4.0. ... However, when I open the file in NetBeans, I don't have any way to compile/run the .java file. ... So if your program won't compile or run, there is a specific problem not related to whether "NetBeans just doesn't accept .java files", because it does. ...
    (comp.lang.java.programmer)
  • Re: classpath compilation problems
    ... > I'm trying to compile all my java files without the need to compile ... > I am using the following compile statement which is run from the working ... If a package statement is in the .java files then the classpath must refer ...
    (comp.lang.java.help)