0

0

如何在Java 9中获取JShell文档?

WBOY

WBOY

发布时间:2023-09-06 16:45:03

|

1433人浏览过

|

来源于tutorialspoint

转载

如何在java 9中获取jshell文档?

Java 9 引入了一种新的交互式工具,称为JShell。该工具可用于执行表达式、类、接口、枚举等。

详细的文档可以在 JShell 中找到,其中包含完整信息,以及使用其内部命令和各种选项的信息。可以使用两个命令访问此文档:“/help”和“/?”。 JShell的文档不仅限于其内部控制的信息,还包括Javadoc

在下面的代码片段中,可以通过使用“ /help”命令。

jshell> /help
|   Type a Java language expression, statement, or declaration.
|   Or type one of the following commands:
|   /list [|-all|-start]
|     list the source you have typed
|   /edit 
|     edit a source entry referenced by name or id
|   /drop 
|     delete a source entry referenced by name or id
|   /save [-all|-history|-start] 
|     Save snippet source to a file.
|   /open 
|     open a file as source input
|   /vars [|-all|-start]
|     list the declared variables and their values
|   /methods [|-all|-start]
|     list the declared methods and their signatures
|   /types [|-all|-start]
|     list the declared types
|   /imports
|     list the imported items
|   /exit
|     exit jshell
|   /env [-class-path  ] [-module-path ] [-add-modules ] ...
|     view or change the evaluation context
|   /reset [-class-path ] [-module-path ] [-add-modules ]...
|     reset jshell
|   /reload [-restore] [-quiet] [-class-path ] [-module-path ]...
|     reset and replay relevant history -- current or previous (-restore)
|   /history
|     history of what you have typed
|   /help [|]
|     get information about jshell
|   /set editor|start|feedback|mode|prompt|truncation|format ...
|     set jshell configuration information
|   /? [| ]
|     get information about jshell
|   /!
|     re-run last snippet
|   /
|     re-run snippet by id
|   /-
|     re-run n-th previous snippet
|   For more information type '/help' followed by the name of a command or a subject.
|   For example '/help /list' or '/help intro'.
|
|   Subjects:
|
|   intro
|     an introduction to the jshell tool
|   shortcuts
|     a description of keystrokes for snippet and command completion,
|     information access, and automatic code generation
|   context
|     the evaluation context options for /env /reload and /reset

立即学习Java免费学习笔记(深入)”;

j2me3D游戏开发简单教程 中文WORD版
j2me3D游戏开发简单教程 中文WORD版

本文档主要讲述的是j2me3D游戏开发简单教程; 如今,3D图形几乎是任何一部游戏的关键部分,甚至一些应用程序也通过用3D形式来描述信息而获得了成功。如前文中所述,以立即模式和手工编码建立所有的3D对象的方式进行开发速度很慢且很复杂。应用程序中多边形的所有角点必须在数组中独立编码。在JSR 184中,这称为立即模式。希望本文档会给有需要的朋友带来帮助;感兴趣的朋友可以过来看看

下载

立即学习Java免费学习笔记(深入)”;

JShell 打印不同的现有内部命令,并快速介绍它们的用途,并访问其使用的更详细说明。为此,我们只需输入命令:“/help”,然后输入详细的命令名称(例如“/set”命令)。

jshell> /help /set
|
|  /set
|
|   Set jshell configuration information, including:
|   the external editor to use, the start-up definitions to use, a new feedback mode,
|   the command prompt, the feedback mode to use, or the format of output.
|
|   /set editor [-wait] ...
|     Specify the command to launch for the /edit command.
|     The  is an operating system dependent string.
|
|   /set start 
|     The contents of the specified become the default start-up snippet s and commands.
|
|   /set feedback 
|     Set the feedback mode describing displayed feedback for entered snippets and commands.
|
|   /set mode [] -command|-quiet|-delete
|     Create or update a user-defined feedback mode, optionally copying from an existing mode.
|
|   /set prompt "" ""
|     Set the displayed prompts for a given feedback mode.
|
|   /set truncation    ...
|     Set the maximum length of a displayed value.
|
|   /set format   "" ...
|     Configure a feedback mode by setting the format of a field when the selector matches.
|
|   /set
|     Show editor, start, and feedback settings as /set commands.
|     To show the settings of any of the above, omit the set value.
|
|     To get more information about one of these forms, use /help with the form specified.
|  For example: /help /set format

立即学习Java免费学习笔记(深入)”;

立即学习Java免费学习笔记(深入)”;

我们需要找到第三部分输入的命令,是否修改JShell的返回(/set Feedback),以修改默认编辑器(/set editor),或者修改JShell的启动(/set start)。

jshell> /help /set feedback
| Set the feedback mode describing displayed feedback for entered snippets and
commands:
|
| /set feedback [-retain] 
|
| Retain the current feedback mode for future sessions:
|
| /set feedback -retain
|
| Show the feedback mode and list available modes:
|
| /set feedback
|
| Where  is the name of a previously defined feedback mode.
| You may use just enough letters to make it unique.
| User-defined modes can be added, see '/help /set mode'
|
| When the -retain option is used, the setting will be used in this and future
| runs of the jshell tool.
|
| The form without  or -retain displays the current feedback mode and available modes.
java速学教程(入门到精通)
java速学教程(入门到精通)

java怎么学习?java怎么入门?java在哪学?java怎么学才快?不用担心,这里为大家提供了java速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!

下载

相关标签:

本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

相关专题

更多
java
java

Java是一个通用术语,用于表示Java软件及其组件,包括“Java运行时环境 (JRE)”、“Java虚拟机 (JVM)”以及“插件”。php中文网还为大家带了Java相关下载资源、相关课程以及相关文章等内容,供大家免费下载使用。

866

2023.06.15

java正则表达式语法
java正则表达式语法

java正则表达式语法是一种模式匹配工具,它非常有用,可以在处理文本和字符串时快速地查找、替换、验证和提取特定的模式和数据。本专题提供java正则表达式语法的相关文章、下载和专题,供大家免费下载体验。

745

2023.07.05

java自学难吗
java自学难吗

Java自学并不难。Java语言相对于其他一些编程语言而言,有着较为简洁和易读的语法,本专题为大家提供java自学难吗相关的文章,大家可以免费体验。

741

2023.07.31

java配置jdk环境变量
java配置jdk环境变量

Java是一种广泛使用的高级编程语言,用于开发各种类型的应用程序。为了能够在计算机上正确运行和编译Java代码,需要正确配置Java Development Kit(JDK)环境变量。php中文网给大家带来了相关的教程以及文章,欢迎大家前来阅读学习。

398

2023.08.01

java保留两位小数
java保留两位小数

Java是一种广泛应用于编程领域的高级编程语言。在Java中,保留两位小数是指在进行数值计算或输出时,限制小数部分只有两位有效数字,并将多余的位数进行四舍五入或截取。php中文网给大家带来了相关的教程以及文章,欢迎大家前来阅读学习。

420

2023.08.02

java基本数据类型
java基本数据类型

java基本数据类型有:1、byte;2、short;3、int;4、long;5、float;6、double;7、char;8、boolean。本专题为大家提供java基本数据类型的相关的文章、下载、课程内容,供大家免费下载体验。

447

2023.08.02

java有什么用
java有什么用

java可以开发应用程序、移动应用、Web应用、企业级应用、嵌入式系统等方面。本专题为大家提供java有什么用的相关的文章、下载、课程内容,供大家免费下载体验。

431

2023.08.02

java在线网站
java在线网站

Java在线网站是指提供Java编程学习、实践和交流平台的网络服务。近年来,随着Java语言在软件开发领域的广泛应用,越来越多的人对Java编程感兴趣,并希望能够通过在线网站来学习和提高自己的Java编程技能。php中文网给大家带来了相关的视频、教程以及文章,欢迎大家前来学习阅读和下载。

16947

2023.08.03

c++ 根号
c++ 根号

本专题整合了c++根号相关教程,阅读专题下面的文章了解更多详细内容。

58

2026.01.23

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号