Environment¶
- public class Environment extends EnvironmentBase¶
This class provides access to the environment variables and provides facilities to specify where to load the underlying AMPL interpreter.
Fields¶
PATH¶
- public static final String PATH¶
Get the platform dependent name of the
path
environment variable. To append a directory to current list of system paths, follow the snippet below:Environment e = new Environment(); String paths = e.get(Environment.PATH); e.put(Environment.PATH, paths + java.io.File.pathSeparatorChar + "/mynewpath");
Note that changing the paths in this way has effect only until the underlying AMPL process is started (in the
AMPL
constructor).
Constructors¶
Environment¶
- public Environment()¶
Default constructor, just copies the values of the current system environment variables. Expects the AMPL binary in a directory included in the system paths list or in the default position (which is APIJARLOCATION/ampl)
Environment¶
Environment¶
Methods¶
containsKey¶
get¶
getBinDir¶
getBinName¶
getWorkingDir¶
isEmpty¶
- public boolean isEmpty()¶
put¶
setBinDir¶
setBinName¶
size¶
- public int size()¶