Re: Java - bash environment variables
It's not a good option if someone wants to run it who doesn't have a .bashrc file though. Could you define the values you need in a .properties file? No need to parse that, just load up with the load() method of Java.util.Properties. You could also load it from the classpath with getResourceAsStream() from java.lang.Class.
Edit: Alternatively, have you tried System.getenv() to get environment variables?
Last edited by r-senior; March 1st, 2013 at 07:29 PM.
Please create new threads for new questions.
Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].