matlab/matlab-agentic-toolkit / skills-catalog/matlab-external-language-interfaces/matlab-configure-java
matlab-configure-java
VerifiedCheck which Java version MATLAB is using, switch it, or reset it without accidentally starting Java. Use this skill when a user wants to determine which Java/JDK/JRE version MATLAB is using, configure MATLAB to use a different JDK, or revert to the MATLAB default Java, or when a MATLAB script errors on a java.* API call ("no runtime environment for Java applications has been found", "Unable to find Java library"). Covers jenv and matlab_jenv, R2025a+ dynamic loading, restart requirements based on Java load status, and release- and platform-specific reset behavior. Also handles installing OpenJDK (the MATLAB Add-Ons Explorer, Adoptium, or a command-line mpm install through matlab-core:matlab-install-products).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 19.7 KB |
| manifest.yaml | config | 525 B |
| references/error-signatures.md | markdown | 1.9 KB |
| references/load-status-check.md | markdown | 2.6 KB |
references/load-status-check.md
View on GitHub# Load-Status Check
Decision table for interpreting the `Status` field returned by `jenv` (no args).
## The `jenv` output
`jenv` (called with no arguments) returns a `JavaEnvironment` object with five fields:
| Field | Type | Meaning |
|-------|------|---------|
| `Version` | string | JDK version currently configured. Empty (`[0×0 string]`) when nothing is configured. |
| `Home` | string | Absolute path to the JDK. Empty when nothing is configured. |
| `Library` | string | Absolute path to the JVM shared library. Empty when nothing is configured. |
| `Status` | string | `"loaded"` or `"notloaded"`. Governs the restart decision. |
| `Configuration` | string | The configured value (`""` when nothing is configured). It does not say whether the personal or the installation (`-allusers`) configuration set it. |
## Decision table
| `Status` value | Meaning | Restart required after a switch or reset (`jenv(path)`, or the reset command for the release and platform in SKILL.md Branch B step 4)? | What to tell the user |
|---|---|---|---|
| `notloaded` | MATLAB has selected a JRE but has not yet started the JVM. On R2025a+ MATLAB loads Java lazily on the first `java.*` call. | **No.** | *"The new setting will be picked up on the next `java.*` call — no MATLAB restart required."* |
| `loaded` | MATLAB has started the JVM. In-process JVM swap is not supported. | **Yes.** | *"MATLAB must be quit and relaunched to pick up the new JVM."* |
## Verification
After the switch (and, if `Status: loaded`, after the MATLAB relaunch), call `jenv` again with no arguments. Confirm `Version` names the requested JDK. If a `java.*` call has run since the switch, `Status` will be `loaded`; otherwise `notloaded`.
Do **not** use `version -java` for verification — it reports only the version string and gives no signal about whether a restart is still pending.
## Notes
- **The observation-recommendation link is the whole point of this table.** The common failure mode is reading `Status: notloaded` correctly and then recommending a restart anyway. Wire the two together explicitly in the response.
- **`Configuration` is informational, not decisional.** On R2025a+ with a fresh auto-discovered JDK, this field is `""`. It becomes non-empty once a Java is configured at either level. An installation configuration takes precedence over a personal one; if a personal change leaves `jenv` output unchanged, see SKILL.md Branch B step 4, *Configuration levels*.
- **`Status` is the only field that governs restart advice.** Do not branch on `Configuration`, `Home`, or `Version` for the restart decision.
----
Copyright 2026 The MathWorks, Inc.
----
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |