jdk.jshell (Java SE 11 & JDK 11 ) (original) (raw)
This module provides support for Java Programming Language 'snippet' evaluating tools, such as Read-Eval-Print Loops (REPLs), including the jshell tool. Separate packages support building tools, configuring the execution of tools, and programmatically launching the existing Java shell tool.
The jdk.jshell is the package for creating 'snippet' evaluating tools. Generally, this is only package that would be needed for creating tools.
The jdk.jshell.spi package specifies a Service Provider Interface (SPI) for defining execution engine implementations for tools based on thejdk.jshell API. The jdk.jshell.execution package provides standard implementations of jdk.jshell.spi interfaces and supporting code. It also serves as a library of functionality for defining new execution engine implementations.
The jdk.jshell.tool package supports programmatically launching the_jshell_ tool.
The jdk.jshell.execution package contains implementations of the interfaces in jdk.jshell.spi. Otherwise, the four packages are independent, operate at different levels, and do not share functionality or definitions.
Tool Guides:
Module Graph:
Since:
9
Packages
Exports
Package Description jdk.jshell Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL), which interactively evaluate "snippets" of Java programming language code. jdk.jshell.execution Provides implementation support for building JShell execution engines. jdk.jshell.spi Defines the Service Provider Interface for pluggable JShell execution engines. jdk.jshell.tool Provides a mechanism to launch an instance of a Java™ shell tool. Indirect Exports From Packages ----------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- java.compiler javax.annotation.processing javax.lang.model javax.lang.model.element javax.lang.model.type javax.lang.model.util javax.tools java.prefs java.util.prefs jdk.jdi com.sun.jdi com.sun.jdi.connect com.sun.jdi.connect.spi com.sun.jdi.event com.sun.jdi.request Modules
Requires
Modifier Module Description transitive java.compiler Defines the Language Model, Annotation Processing, and Java Compiler APIs. transitive java.prefs Defines the Preferences API. transitive jdk.jdi Defines the Java Debug Interface. Services
Provides
Type Description ExecutionControlProvider Tool Uses Type Description ------------------------------------------------------------------------------------------------------ ----------------------------------------------------------------------------------------- ExecutionControlProvider The provider used by JShell to generate the execution engine needed to evaluate Snippets.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.