Results 1 to 2 of 2
  1. #1
    Mac Environment Variables and Java

    Member Since
    Oct 03, 2009
    Posts
    4
    Mac Environment Variables and Java
    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:

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

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>CAPTUREDBHOST</key>
    	<string>localhost</string>
    </dict>
    </plist>
    And that isn't working either. What am I missing?

  2. #2
    Mac Environment Variables and Java

    Member Since
    Oct 03, 2009
    Posts
    4
    Figured it out. I was using the wrong method in Java. Should of been using System.getenv(), not System.getProperty()

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. creating environment variables in environment.plist?
    By pines3 in forum OS X - Operating System
    Replies: 0
    Last Post: 01-25-2013, 02:17 AM
  2. Replies: 0
    Last Post: 01-23-2013, 07:39 PM
  3. How do I set environment variables in Leapord
    By Smacky311 in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 10-03-2008, 06:33 PM
  4. Setting Environment Variables
    By oquimdcr in forum OS X - Operating System
    Replies: 9
    Last Post: 09-09-2008, 01:51 AM
  5. How to set environment variables?
    By HSN in forum OS X - Apps and Games
    Replies: 5
    Last Post: 12-06-2007, 10:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •