Results 1 to 7 of 7
Thread: Access Denied Error Message
- 05-20-2012, 04:48 AM #1
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
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.

When I try to compile the program in CMD this happens.

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
- 05-20-2012, 05:18 AM #2
Member
- Join Date
- Sep 2011
- Location
- Mumbai, India
- Posts
- 35
- Rep Power
- 0
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
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.
- 05-20-2012, 05:24 AM #3
Member
- Join Date
- Feb 2012
- Location
- Phoenix, AZ
- Posts
- 26
- Rep Power
- 0
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.
- 05-20-2012, 06:28 AM #4
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
Re: Access Denied Error Message
This is the folder my path is set to with the program code in it (kgtolbs)

When I try to compile the code when set program is in that folder this happens:

, 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.
- 05-20-2012, 12:26 PM #5
Member
- Join Date
- Sep 2011
- Location
- Mumbai, India
- Posts
- 35
- Rep Power
- 0
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.
- 05-20-2012, 12:45 PM #6
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.
- 05-20-2012, 05:35 PM #7
Member
- Join Date
- May 2012
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
Applet access denied error
By JimBobJr in forum Java AppletsReplies: 1Last Post: 04-10-2012, 10:18 AM -
Jni registry 'access denied' error.
By durino13 in forum Advanced JavaReplies: 4Last Post: 09-17-2011, 07:06 AM -
Access Denied Error using applets
By vin_eets in forum Java AppletsReplies: 0Last Post: 04-01-2011, 02:19 PM -
newbie here, access denied error?!?
By kingpabs in forum JCreatorReplies: 3Last Post: 04-01-2011, 02:16 AM -
[SOLVED] Access Denied error using FileInputStream
By xcallmejudasx in forum New To JavaReplies: 8Last Post: 05-21-2009, 04:13 AM


LinkBack URL
About LinkBacks


Bookmarks