JavaEnvironment - Java environment information - MATLAB (original) (raw)
Main Content
Java environment information
Since R2023a
Description
A JavaEnvironment
object contains information about the Java® program on your system. Java environment information persists across different MATLAB® sessions.
Creation
To create a JavaEnvironment
object or change the properties, call jenv. You cannot change the Java environment after MATLAB loads. To change the environment, restart MATLAB, and then call jenv
.
Properties
Version
— Java version
string
This property is read-only.
Java version, returned as a string. To set the Version
property, call jenv
with the version
argument set to a version number that MATLAB supports. For information about supported versions, see MATLAB Interfaces to Other Languages.
Example: "Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode"
Home
— Home folder
string
This property is read-only.
Home folder, returned as a string that contains the path to theJava.Home
system property.
Example: "/Applications/sys/java/jre"
Library
— Java Virtual Machine library file
string
This property is read-only.
Java Virtual Machine library file, returned as a string that contains the path to the file.
Example: "/Applications/sys/java/jre/lib/server/libjvm.dylib"
Status
— Process status
notloaded
(default) | loaded
This property is read-only.
Process status, returned as notloaded
orloaded
.
Configuration
— Settings value of Java
"factory"
(default) | "system"
| custom Java path
This property is read-only.
Settings value of Java, returned as a string with one of these values:
"factory"
— Version included with MATLAB"system"
— Default version on your system- Custom Java path — Folder of an installed Java on your computer
To set the Configuration
property, calljenv
with the version
argument.
Version History
Introduced in R2023a