Skip to main content

Java

Whatโ€‹

Display the currently active java version.

Sample Configurationโ€‹

{
"type": "java",
"style": "powerline",
"powerline_symbol": "๎‚ฐ",
"foreground": "#ffffff",
"background": "#4063D8",
"template": " ๎œธ {{ .Full }}"
}

Propertiesโ€‹

NameTypeDescription
home_enabledbooleandisplay the segment in the HOME folder or not - defaults to false
fetch_versionbooleandisplay the java version - defaults to true
missing_command_textstringtext to display when the java command is missing - defaults to empty
display_modestring
  • always: the segment is always displayed
  • files: the segment is only displayed when one of the following files is present
    • pom.xml
    • build.gradle.kts
    • build.sbt
    • .java-version
    • .deps.edn
    • project.clj
    • build.boot
    • *.java
    • *.class
    • *.gradle
    • *.jar
    • *.clj
    • *.cljc

Template (info)โ€‹

default template
{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}

Propertiesโ€‹

NameTypeDescription
.Fullstringthe full version
.Majorstringmajor number
.Minorstringminor number
.Patchstringpatch number
.Errorstringerror encountered when fetching the version string