New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Mac Environment Variables and Java

Post Reply New Thread Subscribe

Thread Tools

Member Since: Oct 03, 2009
Posts: 4
malakh is on a distinguished road

malakh is offline
Hey guys -

I am trying to access an environment variable that i created with Java (System.getProperty()), but it is always coming back as not existing. I have tried adding it to the .profile:

export CAPTUREDBHOST=localhost
And that doesn't work. I have also tried adding it to the ~/.MacOS/environment.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
And that isn't working either. What am I missing?
QUOTE Thanks

Member Since: Oct 03, 2009
Posts: 4
malakh is on a distinguished road

malakh is offline
Figured it out. I was using the wrong method in Java. Should of been using System.getenv(), not System.getProperty()
QUOTE Thanks

Post Reply New Thread Subscribe

« Border around windows | Trying to set up dev environment for PHP Extension »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 04:39 AM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?