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

Unable to save a program

Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 155

Richie need help again am getting <Unexpected error, contact your administrator> error again while saving a program
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
That was a new question unrelated to the original thread, so I thought it deserved a thread of its own.

Please supply more details. What sort of computer and OS are you using? Where are you trying to save your work? I hope not in Program Files, which is an inappropriate location for your own work.
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4391
    
    8

Campbell's your administrator? Cool.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
Not me, but Richie. I've known him for over twenty years.
Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 155

hello i have written a program and i am trying to save it C:\Program Files\Java\jdk1.7.0\bin at this location but when i'm trying to save it it asks following error
You dont have permission to save in this location. Conatct administrator to obtain the permission
and asks Would you like to save in the My Documents folder instead?
please help. nothig is happening.
and when we try to access bin folder through cmd prompt and give a dir command then it does not show add.java file saved.

I'm using windows 7 home basic edition. In C drive its showing two different fo;ders named Program Files and Program Files(x86).
please help
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11314
    
  16

I think that error is fairly self-explanatory. Your user account does not have permission to save a file in that directory - and that is a good thing. You DON'T WANT to save your java files (or your class files) in the JDK's bin directory. That directory is for the JDK code.

Make your own directory, and save your files there. c:\myJava might be a good place to start.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
Fred is right. I already told you Program Files is an inappropriate place to save things. Look at this older post.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to save a program