Class ASenvPropertyReader
java.lang.Object
com.sun.enterprise.universal.glassfish.ASenvPropertyReader
Class ASenvPropertyReader
This class converts the variables stored in asenv.conf (UNIX)
or asenv.bat (WINDOWS) into their equivalent system properties.
This class guarantees that no Exception will get thrown back. You may however, have a bad javaRoot set even though we tried everything to find one
-
Constructor Summary
ConstructorsConstructorDescriptionRead and process the information in asenv There are no arguments because the installation directory is calculated relative to the jar file you are calling from.ASenvPropertyReader(File installDir) Read and process the information in asenv. -
Method Summary
-
Constructor Details
-
ASenvPropertyReader
public ASenvPropertyReader()Read and process the information in asenv There are no arguments because the installation directory is calculated relative to the jar file you are calling from. Unlike V2 this class will not set any System Properties. Instead it will give you a Map<String,String> containing the properties.To use the class, create an instance and then call getProps().
-
ASenvPropertyReader
Read and process the information in asenv.[bat|conf] This constructor should normally not be called. It is designed for unit test classes that are not running from an official installation.- Parameters:
installDir- The Glassfish installation directory
-
-
Method Details
-
getProps
Returns the properties that were processed. This includes going to a bit of trouble setting up the hostname and java root.- Returns:
- A Map<String,String> with all the properties
-
toString
Returns a string representation of the properties in the Map<String,String>. Format: name=value\nname2=value2\n etc.
-