# getJavaVersion

@Incubating
@Optional
@Input
abstract fun getJavaVersion(): Property<JavaLanguageVersion>(source)

The Java language version used when parsing Java source files, e.g. JavaLanguageVersion.of(17).

Groovydoc uses the JavaParser library to read Java sources; this controls the source level it assumes, which is needed for parsing newer Java language constructs (for example, sealed classes require Java 17). When unset, Groovydoc uses the JavaParser library's own default.

Only has an effect with Groovy 4.0.27 or later; the option is silently ignored with earlier Groovy versions.

#### Since

9.8.0