Results 1 to 7 of 7
  1. #1
    firebomb428 is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Access Denied Error Message

    Hey everybody, first of all thanks for taking a look at this thread I appreciate the help. I'm trying to make a very simple java program that converts kilograms (kg) to pounds (lbs). Here is the code.
    Access Denied Error Message-textpad-kgtolbs.jpg
    When I try to compile the program in CMD this happens.
    Access Denied Error Message-cmd-kgtolbs.jpg
    I have my path set to a folder in my documents but the program I was trying to compile was located in the jdk bin.
    Thanks for your help, firebomb428

  2. #2
    Join Date
    Sep 2011
    Location
    Mumbai, India
    Posts
    35
    Rep Power
    0

    Default Re: Access Denied Error Message

    Firstly whenever you want to post any code than there is code tags available so you don't have to take a print-screen and paste here

    Quote Originally Posted by firebomb428 View Post
    I have my path set to a folder in my documents but the program I was trying to compile was located in the jdk bin.
    1) You said my path is set to a folder in MY DOCUMENTS, so please set the path to a folder where you are saving your program.

    2) You should never save your program in the bin directory of your jdk, its a bad idea!!!!

    3) Make a folder of your name in any directory, save your program in it, set the path to it and try again.

  3. #3
    subzero1012 is offline Member
    Join Date
    Feb 2012
    Location
    Phoenix, AZ
    Posts
    26
    Rep Power
    0

    Default Re: Access Denied Error Message

    Hello,
    Could it be that you can't write a .class file to the bin folder? Maybe you could try to move the .java file to a different folder. Then, navigate to that folder and run the full path javac command. Or, try putting the bin folder in your env variables path and running the javac command from where the .java file is stored.

  4. #4
    firebomb428 is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Re: Access Denied Error Message

    Quote Originally Posted by Rameshwar Soni View Post
    Firstly whenever you want to post any code than there is code tags available so you don't have to take a print-screen and paste here



    1) You said my path is set to a folder in MY DOCUMENTS, so please set the path to a folder where you are saving your program.

    2) You should never save your program in the bin directory of your jdk, its a bad idea!!!!

    3) Make a folder of your name in any directory, save your program in it, set the path to it and try again.

    This is the folder my path is set to with the program code in it (kgtolbs)
    Access Denied Error Message-saure1.png
    When I try to compile the code when set program is in that folder this happens:
    Access Denied Error Message-sure.jpg
    , now how do I compile program?

    P.S Even if I place a .java behind the 'kgtolbs' when I try to compile in CMD the same happens (sorry forgot when I took the picture)
    Last edited by firebomb428; 05-20-2012 at 06:32 AM.

  5. #5
    Join Date
    Sep 2011
    Location
    Mumbai, India
    Posts
    35
    Rep Power
    0

    Default Re: Access Denied Error Message

    Your error is "javac is not recognized as an internal or external command......................" which means your path is not set.

    So if you have the bin directory of jdk in "C:\Program files\Java\jdk 1.7.0\bin then in command prompt before compiling your programs set your path like done below :

    set path = "C:\Program files\Java\jdk 1.7.0\bin"; then try compiling your programs.

    Note this is just a temporary way i.e. once you close the command prompt you will have to set the path again.

    You can also set it permanently by right clicking My Computers -> properties ........................etc which i think you can google.

    But now atleast you can start with with Java which is important.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: Access Denied Error Message

    To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection will show
    Click in upper left again
    Select Edit and click 'Copy'

    Paste here.
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    firebomb428 is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Re: Access Denied Error Message

    Just figured it out thanks for the help everyone

Similar Threads

  1. Applet access denied error
    By JimBobJr in forum Java Applets
    Replies: 1
    Last Post: 04-10-2012, 10:18 AM
  2. Jni registry 'access denied' error.
    By durino13 in forum Advanced Java
    Replies: 4
    Last Post: 09-17-2011, 07:06 AM
  3. Access Denied Error using applets
    By vin_eets in forum Java Applets
    Replies: 0
    Last Post: 04-01-2011, 02:19 PM
  4. newbie here, access denied error?!?
    By kingpabs in forum JCreator
    Replies: 3
    Last Post: 04-01-2011, 02:16 AM
  5. [SOLVED] Access Denied error using FileInputStream
    By xcallmejudasx in forum New To Java
    Replies: 8
    Last Post: 05-21-2009, 04:13 AM

Tags for this Thread

Posting Permissions

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