Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: What's the problem ??

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What's the problem ??

    I am a beginner with JAVA..

    I have typed my first program in notepad and trying to compile it.. But there is a problem.. Plz help

    Here is the code:

    public class HelloWorld
    {
    public static void main(String[] args)
    {
    System.out.println("Hello World!");
    }
    }


    and the error is as shown:

    error is.JPG
    Attached Images Attached Images
    Last edited by rk0887; June 27th, 2012 at 11:28 AM.


  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: What's the problem ??

    The error is as shown:

    HelloWorld.java:2: error: error while writing HelloWorld: HelloWrld.class <Access is denied>
    public class HelloWorld

    1 error

    (the error cursor is below the c of class)

  3. #3
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: What's the problem ??

    The problem is due to the Windows UAC (User Access Controls). Windows restricts access to the Program Files directory. The best way to get around this is to move your java source files out of the Program Files directory into a non-protected location, for example C:/Java.

  4. #4
    Junior Member
    Join Date
    Jun 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: What's the problem ??

    Quote Originally Posted by helloworld922 View Post
    The problem is due to the Windows UAC (User Access Controls). Windows restricts access to the Program Files directory. The best way to get around this is to move your java source files out of the Program Files directory into a non-protected location, for example C:/Java.
    THANK YOU VERY MUCH for your help !!

    Now I can run my programs...

Similar Threads

  1. Replies: 3
    Last Post: January 5th, 2012, 01:44 AM