aspose file tools*
The moose likes Beginning Java and the fly likes Not able to save a java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Not able to save a java program" Watch "Not able to save a java program" New topic
Author

Not able to save a java program

Pooja Oza
Greenhorn

Joined: Apr 01, 2009
Posts: 21
Hey friends,

Can someone please help me with this problem -

I m trying to save a Java program in notepad in the directory C:\Program Files\Java\jdk1.6.0_20\bin\AddTwoInt.java. It gives me this message in a pop-up -



C:\Program Files\Java\jdk1.6.0_20\bin\AddTwoInt.java
You do not have permission to save in this location.
Contact administrator to obtain permission.

Would you like to Save it in the Documents folder instead?


I just don't understand where i myself is the administrator how cant it allow me to save a java program?

Please help me out with it. I really need your help friends!!!

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10392
    
    8

Saving your code in the bin folder is a very bad idea.
You should have a something like c:\MyCode and use that for your code.
Once you move on to IDEs you will notice they do the same thing. You will end up with something like c:\workspace\project1...c:\workspace\projectn


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3832

I m trying to save a Java program in notepad in the directory C:\Program Files\Java\jdk1.6.0_20\bin\AddTwoInt.java.

That really is not a good place to save Java files anyway
I just don't understand where i myself is the administrator how cant it allow me to save a java program?

Are you logged in as the administrator? Can you save any other type of file in that location?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38896
    
  23
When you open your command prompt write
mkdir java
. . . or similar, and you can get to your new "java" folder by writing
cd java
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to save a java program