Mailing Lists: Apple Mailing Lists

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

LSEnvironment works for Java apps?



I'm trying to get access to application-specific environment variables from within a bundled Java application as described in:
http://developer.apple.com/documentation/MacOSX/Conceptual/ BPRuntimeConfig/Concepts/EnvironmentVars.html

This directs one (as I read it) to add an LSEnvironment entry to the <appname>.app/Contents/Info.plist whose key/values are the variable/values. This doesn't work for me.

How do I know it's not working? When I Runtime.getRuntime().exec("/usr/bin/env") I don't find the added variables. Is this supposed to work for bundled Java apps?

What I'm really trying to do is put the commandline utility "p4" on a Java IDE's path one of its plugins that does perforce commands by exec'ing will work. I've gotten the plugin to work by:
1) adding a PATH entry to my ~/.MacOSX/environment.plist. This is not acceptable because adding this entry overwrote the path for all Aqua apps...causing grief with starting SAMBA and Apache from the System Preferences panels. And setting PATH to $PATH:/usr/local/bin/p4 doesn't work...the variable expansion doesn't happen.
2) launching the IDE from the command line using "open" where I've added the "p4" commands path in the usual bash way. This is just a pain.

Next step, I suppose will be to replace the IDE's launcher by a shell script that sets up the environment then calls ...ugh.
_______________________________________________
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.




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.