wood burning stoves*
The moose likes Beginning Java and the fly likes User Account Control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "User Account Control" Watch "User Account Control" New topic
Author

User Account Control

Jeremy Graham
Greenhorn

Joined: Feb 14, 2011
Posts: 14
I recently purchased Head First Java 2nd Ed. and tried to do the Phrase-O-Matic program on page 16. The only way I was able to actually do it is to turn off the User Account Control in order for the compiler to actually do anything with the text script. Does any one have a clue as to why that is? I'm running on Windows Vista 64-bit.

Thanks
Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
This is really outside of Beginning Java, though I don't know where else you'd put it in this set of forums.

Vista and Windows 7 appear to take the attitude that, if your program attempts to write anywhere they they regard as "not in your area", then they don't allow it. Sometimes they give you a message about it, sometimes they don't. Having an administrator account, which used to give you "all privileges" on an XP box, no longer does. Turning off User Account Control seems to disable this behavior.

I'm afraid I don't have much more than that. And my opinion of it isn't nice.

rc
Bobby Smallman
Ranch Hand

Joined: Sep 09, 2010
Posts: 107
Where exactly are you trying to access the file from? Windows Vista and 7 get angry if a program who is not explicitly run "as Administrator" is trying to access/modify files outside of area where Windows thinks it should be meddling. For example, Windows Vista and 7 likes to restrict all access to files within "Program Files" unless the program has direct coloration to the folders in question (or again explicit administrator access, by which I mean when you are directly prompted to click "Yes" or "I Agree" to access a file/folder in the wonderful Windows pop-ups) If you have not already done so, I would place the file you need access to in a public location such as you "Documents" folder or directly in your workspace for Eclipse. Let us know where exactly your file which needs to be accessed is located and also if the user which you are logged in as has full rights on the system.


Everyday in every way, we get a little better.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
Welcome to the Ranch

Agree about location of files: follow the suggestion I made about a week ago here, and create a folder in "My Documents".
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

Campbell Ritchie wrote:create a folder in "Documents".

There, fixed it. Since Windows Vista, it's no longer "My Computer", "My Documents", "My Music", "My Pictures", etc. The "My" part has been dropped; Microsoft has taken control of these folders


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jeremy Graham
Greenhorn

Joined: Feb 14, 2011
Posts: 14
I uninstalled/reinstalled JDK and now everything works fine. Here's what I think was causing the problem: I had a JRE in the folder Program Files (x86) and my JDK was in the folder Program Files. While trying to figure out what was going on I read somewhere that if I had JREs in two different locations I might run into a problem. I forgot where I read that but it's what led me to even know about the User Account Control thing.

Thanks.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
Well done sorting it out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: User Account Control
 
Similar Threads
How to create a role in LifeRay
Access is denied , Unable to open the service "Tomcat6"
Win XP, the 'Switch User' screen and .NET accounts
Email preferences
User access rights/privelages in linux