com.sun.enterprise.universal.glassfish
Class ASenvPropertyReader

java.lang.Object
  extended by com.sun.enterprise.universal.glassfish.ASenvPropertyReader

public class ASenvPropertyReader
extends Object

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
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.
ASenvPropertyReader(File installDir)
          Read and process the information in asenv.[bat|conf] This constructor should normally not be called.
 
Method Summary
 Map<String,String> getProps()
          Returns the properties that were processed.
 String toString()
          Returns a string representation of the properties in the Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 containing the properties.

To use the class, create an instance and then call getProps().


ASenvPropertyReader

public ASenvPropertyReader(File installDir)
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 Detail

getProps

public Map<String,String> 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 with all the properties

toString

public String toString()
Returns a string representation of the properties in the Map. Format: name=value\nname2=value2\n etc.

Overrides:
toString in class Object
Returns:
the string representation.


Copyright © 2012 GlassFish Community. All Rights Reserved.