Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Runtime.getruntime().exec("")



Sam Hart wrote:
| % echo $PATH
| /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
| hmmm... in order to put a path that gets searched before /usr/bin you
| would need admin rights.

Why do you say that? PATH is just a shell variable; any common riff-raff can change it with no special privileges at all. It's possible to change it without a shell, by writing a small launcher program that sets the environment properly before doing an exec() call. (After all, the shell itself is just such a program, albeit one rather more feature-laden.) It may even be possible to set it using the .MacOSX/environment.plist feature (http://developer.apple.com/qa/qa2001/qa1067.html).

Glen Fisher
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Runtime.getruntime().exec("") (From: Sam Hart <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.