> ## Documentation Index
> Fetch the complete documentation index at: https://bazel-pr-30827.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# java {#modules.java}

A java compiler configuration.

## Members

* [bytecode\_optimization\_pass\_actions](#bytecode_optimization_pass_actions)
* [bytecode\_optimizer\_mnemonic](#bytecode_optimizer_mnemonic)
* [default\_javac\_flags](#default_javac_flags)
* [default\_javac\_flags\_depset](#default_javac_flags_depset)
* [default\_jvm\_opts](#default_jvm_opts)
* [disallow\_java\_import\_exports](#disallow_java_import_exports)
* [multi\_release\_deploy\_jars](#multi_release_deploy_jars)
* [one\_version\_enforcement\_level](#one_version_enforcement_level)
* [plugins](#plugins)
* [run\_android\_lint](#run_android_lint)
* [split\_bytecode\_optimization\_pass](#split_bytecode_optimization_pass)
* [strict\_java\_deps](#strict_java_deps)
* [use\_header\_compilation\_direct\_deps](#use_header_compilation_direct_deps)
* [use\_ijars](#use_ijars)

<h2 id="bytecode_optimization_pass_actions">
  bytecode\_optimization\_pass\_actions
</h2>

```
int java.bytecode_optimization_pass_actions
```

This specifies the number of actions to divide the OPTIMIZATION stage of the bytecode optimizer into. Note that if split\_bytecode\_optimization\_pass is set, this will only change behavior if it is > 2.

<h2 id="bytecode_optimizer_mnemonic">
  bytecode\_optimizer\_mnemonic
</h2>

```
string java.bytecode_optimizer_mnemonic
```

The mnemonic for the bytecode optimizer.

<h2 id="default_javac_flags">
  default\_javac\_flags
</h2>

```
list java.default_javac_flags
```

The default flags for the Java compiler.

<h2 id="default_javac_flags_depset">
  default\_javac\_flags\_depset
</h2>

```
depset java.default_javac_flags_depset
```

The default flags for the Java compiler.

<h2 id="default_jvm_opts">
  default\_jvm\_opts
</h2>

```
list java.default_jvm_opts
```

Additional options to pass to the Java VM for each java\_binary target

<h2 id="disallow_java_import_exports">
  disallow\_java\_import\_exports
</h2>

```
bool java.disallow_java_import_exports()
```

Returns true if java\_import exports are not allowed.

<h2 id="multi_release_deploy_jars">
  multi\_release\_deploy\_jars
</h2>

```
bool java.multi_release_deploy_jars
```

Always true. Java deploy jars preserve multi-release entries.

<h2 id="one_version_enforcement_level">
  one\_version\_enforcement\_level
</h2>

```
string java.one_version_enforcement_level
```

The value of the --experimental\_one\_version\_enforcement flag.

<h2 id="plugins">
  plugins
</h2>

```
list java.plugins
```

A list containing the labels provided with --plugins, if any.

<h2 id="run_android_lint">
  run\_android\_lint
</h2>

```
bool java.run_android_lint
```

The value of the --experimental\_run\_android\_lint\_on\_java\_rules flag.

<h2 id="split_bytecode_optimization_pass">
  split\_bytecode\_optimization\_pass
</h2>

```
bool java.split_bytecode_optimization_pass
```

Returns whether the OPTIMIZATION stage of the bytecode optimizer will be split across two actions.

<h2 id="strict_java_deps">
  strict\_java\_deps
</h2>

```
string java.strict_java_deps
```

The value of the strict\_java\_deps flag.

<h2 id="use_header_compilation_direct_deps">
  use\_header\_compilation\_direct\_deps
</h2>

```
bool java.use_header_compilation_direct_deps()
```

Returns true if Java header compilation should use separate outputs for direct deps.

<h2 id="use_ijars">
  use\_ijars
</h2>

```
bool java.use_ijars()
```

Returns true iff Java compilation should use ijars.
