Results 1 to 2 of 2
  1. #1

    Member Since
    Oct 03, 2009
    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:

    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?

  2. #2

    Member Since
    Oct 03, 2009
    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 macOS - 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 macOS - Development and Darwin
    Replies: 1
    Last Post: 10-03-2008, 06:33 PM
  4. Setting Environment Variables
    By oquimdcr in forum macOS - Operating System
    Replies: 9
    Last Post: 09-09-2008, 01:51 AM
  5. How to set environment variables?
    By HSN in forum macOS - 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