Results 1 to 3 of 3
  1. #1
    tholland is offline Member
    Join Date
    Dec 2010
    Posts
    2
    Rep Power
    0

    Default Access is denied

    I am running jdk1.6.0_13 on a Vista Home Premium machine, 32 bit with SP2.

    I am trying to compile this program:

    public class HelloUser{
    public static void main(String[] arguments){
    String username = System.getProperty("user.name");
    System.out.println("Hello " + username);
    }
    }

    I get the following error message:

    HelloUser.java:1:error while writing HelloUser.class <Access is denied>
    public class HelloUser{

    How do I correct this.

    Best wishes

    Tony Holland

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    11

    Default

    Copy the file in another directory and try to compile again. Sounds like that you are not allowed to create files there.

  3. #3
    tholland is offline Member
    Join Date
    Dec 2010
    Posts
    2
    Rep Power
    0

Similar Threads

  1. Replies: 22
    Last Post: 04-09-2011, 04:59 AM
  2. access denied
    By Dennis in forum Advanced Java
    Replies: 8
    Last Post: 06-05-2010, 08:46 AM
  3. [SOLVED] Access Denied error using FileInputStream
    By xcallmejudasx in forum New To Java
    Replies: 8
    Last Post: 05-21-2009, 04:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •