Class ASenvPropertyReader

java.lang.Object
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

    Constructors
    Constructor
    Description
    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.
    Read and process the information in asenv.[bat|conf] This constructor should normally not be called.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the properties that were processed.
    Returns a string representation of the properties in the Mapinvalid input: '<'String,String>.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 Mapinvalid input: '<'String,String> 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 Details

    • 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 Mapinvalid input: '<'String,String> with all the properties
    • toString

      public String toString()
      Returns a string representation of the properties in the Mapinvalid input: '<'String,String>. Format: name=value\nname2=value2\n etc.
      Overrides:
      toString in class Object
      Returns:
      the string representation.