Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to save a java program

 
Pooja Oza
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 48952
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you open your command prompt write
mkdir java
. . . or similar, and you can get to your new "java" folder by writing
cd java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic