Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.configuration
Class Jdk

    java.lang.Object
      com.atlassian.bamboo.configuration.LabelPathMap
          com.atlassian.bamboo.configuration.Jdk

    public class Jdk

extends LabelPathMap

This class is a POJO holding the information about a system JDK.

Constructor Summary
`Jdk(String label, String homeDirectory)`

Method Summary
`static Jdk` | `discoverDefaultJdk()` For some reason, the system's JAVA_HOME is sometimes the Jdk's Jre directory.
`String` | `getUiSwitchName()` Inform the UI to display the JDK options.
`boolean` | `isAJdk()` Does the given homeDirectory reference a JDK home?
`boolean` | `isValid()` Does this object reference a valid JDK?
`String` | `toString()`

Methods inherited from class com.atlassian.bamboo.configuration.LabelPathMap
`equals, getBuilder, getBuilderManager, getBuilderType, getHomeDirectory, getLabel, getName, hashCode, setBuilderManager, setBuilderType, setHomeDirectory, setLabel`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Jdk

    public Jdk(String label,
               String homeDirectory)

Method Detail

### isValid

    public boolean isValid()

  Does this object reference a valid JDK?

  Overrides:
    `isValid` in class `LabelPathMap`
  Returns:
    Does the homeDirectory contain bin/java and lib/tools.jar?

### isAJdk

    public boolean isAJdk()

  Does the given homeDirectory reference a JDK home?

  Returns:
    true iff it contains a lib/tools.jar

### getUiSwitchName

    public String getUiSwitchName()

  Inform the UI to display the JDK options.

  Overrides:
    `getUiSwitchName` in class `LabelPathMap`
  Returns:
    The JDK UI switch css name

### discoverDefaultJdk

    public static Jdk discoverDefaultJdk()

  For some reason, the system's JAVA_HOME is sometimes the Jdk's Jre directory.

  If that's the case, we return the parent dir.

  Returns:
    The default system JDK

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.