commandbox.system.services

Class JavaService

lucee.Component
    extended by commandbox.system.services.JavaService

Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I handle Java installs for servers to use

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • author : Brad Wood, Luis Majano, Denny Valliant
  •  
    Property Summary
    type property default serializable required
    any configService


    • access = public
    • returntype = any
    • inject = configService
    true false
    any fileSystemUtil


    • access = public
    • returntype = any
    • inject = fileSystem
    true false
    any interceptorService


    • access = public
    • returntype = any
    • inject = InterceptorService
    true false
    any javaDirectory


    • access = public
    • returntype = any
    true false
    any packageService


    • access = public
    • returntype = any
    • inject = packageService
    true false
    any systemSettings


    • access = public
    • returntype = any
    • inject = systemSettings
    true false
    Method Summary
    string getConfigService()
    any getCurrentCPUArch()
         Guess the current machine's CPU arhctecture.
    any getCurrentOS()
         Guess the current OS.
    string getFileSystemUtil()
    string getInterceptorService()
    string getJavaDirectory()
    string getJavaInstallDirectory()
         Returns the full path to where server java installs are stored.
    any getJavaInstallPath(string ID, [boolean verbose='false'])
         Install java version if needed, and return installation folder.
    string getPackageService()
    string getSystemSettings()
    any installJava(string ID, [boolean verbose='false'])
         Install a java version.
    boolean javaInstallExists(string ID)
         Detect whether a specific version is installed.
    struct listJavaInstalls()
         List the Java installations including the Java install CommandBox is running.
    any onDIComplete()
         DI complete.
    any postInstall()
         Sort of hacky way to capture the last place we installed Java into.
    any setConfigService(any configService)
    any setFileSystemUtil(any fileSystemUtil)
    any setInterceptorService(any interceptorService)
    any setJavaDirectory(any javaDirectory)
    any setPackageService(any packageService)
    any setSystemSettings(any systemSettings)
    any uninstallJava(string ID)
         Remove a Java install.
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    configService

    property any configService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - configService
    serializable - true

    fileSystemUtil

    property any fileSystemUtil

    Attributes:
    access - public
    required - false
    returntype - any
    inject - fileSystem
    serializable - true

    interceptorService

    property any interceptorService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - InterceptorService
    serializable - true

    javaDirectory

    property any javaDirectory

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    packageService

    property any packageService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - packageService
    serializable - true

    systemSettings

    property any systemSettings

    Attributes:
    access - public
    required - false
    returntype - any
    inject - systemSettings
    serializable - true

    Method Detail

    getConfigService

    public string getConfigService()


    getCurrentCPUArch

    public any getCurrentCPUArch()

    Guess the current machine's CPU arhctecture TODO: detect ppc64, s390x, and ppc64le


    getCurrentOS

    public any getCurrentOS()

    Guess the current OS


    getFileSystemUtil

    public string getFileSystemUtil()


    getInterceptorService

    public string getInterceptorService()


    getJavaDirectory

    public string getJavaDirectory()


    getJavaInstallDirectory

    public string getJavaInstallDirectory()

    Returns the full path to where server java installs are stored


    getJavaInstallPath

    public any getJavaInstallPath(string ID, [boolean verbose='false'])

    Install java version if needed, and return installation folder

    Parameters:
    ID - Full ID of java installation
    verbose - Enable verbose output from the install command

    getPackageService

    public string getPackageService()


    getSystemSettings

    public string getSystemSettings()


    installJava

    public any installJava(string ID, [boolean verbose='false'])

    Install a java version

    Parameters:
    ID - installation ID as defined by Java endpoint. If no endpoint name space, defaults to "java:"
    verbose - Enable verbose output from the install command

    javaInstallExists

    public boolean javaInstallExists(string ID)

    Detect whether a specific version is installed

    Parameters:
    ID - Full ID of java installation

    listJavaInstalls

    public struct listJavaInstalls()

    List the Java installations including the Java install CommandBox is running


    onDIComplete

    public any onDIComplete()

    DI complete


    postInstall

    public any postInstall()

    Sort of hacky way to capture the last place we installed Java into


    setConfigService

    public any setConfigService(any configService)

    Parameters:
    configService

    setFileSystemUtil

    public any setFileSystemUtil(any fileSystemUtil)

    Parameters:
    fileSystemUtil

    setInterceptorService

    public any setInterceptorService(any interceptorService)

    Parameters:
    interceptorService

    setJavaDirectory

    public any setJavaDirectory(any javaDirectory)

    Parameters:
    javaDirectory

    setPackageService

    public any setPackageService(any packageService)

    Parameters:
    packageService

    setSystemSettings

    public any setSystemSettings(any systemSettings)

    Parameters:
    systemSettings

    uninstallJava

    public any uninstallJava(string ID)

    Remove a Java install

    Parameters:
    ID - Full ID of java installation