Bagaimana untuk mendapatkan dokumentasi JShell dalam Java 9?
Java 9 memperkenalkan alat interaktif baharu yang dipanggil JShell. Alat ini boleh digunakan untuk melaksanakan ungkapan, kelas, antara muka, penghitungan, dsb.
Dokumentasi terperinci boleh didapati dalam JShell, yang mengandungi maklumat lengkap, serta maklumat tentang menggunakan arahan dalamannya dan pelbagai pilihan. Dokumen ini boleh diakses menggunakan dua arahan: "/help" dan "/?". Dokumentasi JShell tidak terhad kepada maklumat tentang kawalan dalamannya, tetapi juga termasuk Javadoc.
Dalam coretan kod di bawah, anda boleh menggunakan arahan " /help".
<strong>jshell> /help | Type a Java language expression, statement, or declaration. | Or type one of the following commands: | /list [<name or id>|-all|-start] | list the source you have typed | /edit <name or id> | edit a source entry referenced by name or id | /drop <name or id> | delete a source entry referenced by name or id | /save [-all|-history|-start] <file> | Save snippet source to a file. | /open <file> | open a file as source input | /vars [<name or id>|-all|-start] | list the declared variables and their values | /methods [<name or id>|-all|-start] | list the declared methods and their signatures | /types [<names or id>|-all|-start] | list the declared types | /imports | list the imported items | /exit | exit jshell | /env [-class-path <path> ] [-module-path <path>] [-add-modules <modules>] ... | view or change the evaluation context | /reset [-class-path <path>] [-module-path <path>] [-add-modules <modules>]... | reset jshell | /reload [-restore] [-quiet] [-class-path <path>] [-module-path <path>]... | reset and replay relevant history -- current or previous (-restore) | /history | history of what you have typed | /help [<command>|<subject>] | get information about jshell | /set editor|start|feedback|mode|prompt|truncation|format ... | set jshell configuration information | /? [<command>|<subject> ] | 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</strong>
JShell mencetak pelbagai arahan dalaman sedia ada dan memberikan tujuan serta pengenalan pantas mereka untuk arahan yang lebih terperinci tentang penggunaannya. Untuk melakukan ini, kita hanya perlu memasukkan arahan: "/help" diikuti dengan nama arahan terperinci (contohnya arahan "/set"). < /p>
<strong>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 <command> is an operating system dependent string. | | /set start <file> | The contents of the specified become the default start-up snippet s and commands. | | /set feedback <mode> | Set the feedback mode describing displayed feedback for entered snippets and commands. | | /set mode <mode>[<old-mode>] -command|-quiet|-delete | Create or update a user-defined feedback mode, optionally copying from an existing mode. | | /set prompt <mode>"<prompt>" "<continuation-prompt>" | Set the displayed prompts for a given feedback mode. | | /set truncation <mode> <length> <selector> ... | Set the maximum length of a displayed value. | | /set format <mode> <field> "<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</strong>
Kita perlu mencari arahan yang dimasukkan di bahagian ketiga dan sama ada untuk mengubah suai pengembalian JShell (/ tetapkan Maklum Balas#🎜 🎜#) untuk mengubah suai editor lalai (/set editor), atau ubah suai permulaan JShell (/set start).
<strong>jshell> /help /set feedback | Set the feedback mode describing displayed feedback for entered snippets and commands: | | /set feedback [-retain] <mode> | | Retain the current feedback mode for future sessions: | | /set feedback -retain | | Show the feedback mode and list available modes: | | /set feedback | | Where <mode> 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 <mode> or -retain displays the current feedback mode and available modes.</strong>
Atas ialah kandungan terperinci Bagaimana untuk mendapatkan dokumentasi JShell dalam Java 9?. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Alat AI Hot

Undresser.AI Undress
Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover
Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool
Gambar buka pakaian secara percuma

Clothoff.io
Penyingkiran pakaian AI

AI Hentai Generator
Menjana ai hentai secara percuma.

Artikel Panas

Alat panas

Notepad++7.3.1
Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina
Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1
Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6
Alat pembangunan web visual

SublimeText3 versi Mac
Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Topik panas



Artikel ini membincangkan pelaksanaan caching pelbagai peringkat di Java menggunakan kafein dan cache jambu untuk meningkatkan prestasi aplikasi. Ia meliputi persediaan, integrasi, dan faedah prestasi, bersama -sama dengan Pengurusan Dasar Konfigurasi dan Pengusiran PRA Terbaik

Artikel ini meneroka mengintegrasikan pengaturcaraan berfungsi ke dalam Java menggunakan ekspresi Lambda, API Streams, rujukan kaedah, dan pilihan. Ia menyoroti faedah seperti kebolehbacaan dan kebolehkerjaan kod yang lebih baik melalui kesimpulan dan kebolehubahan

Kelas kelas Java melibatkan pemuatan, menghubungkan, dan memulakan kelas menggunakan sistem hierarki dengan bootstrap, lanjutan, dan pemuat kelas aplikasi. Model delegasi induk memastikan kelas teras dimuatkan dahulu, yang mempengaruhi LOA kelas tersuai

Artikel ini membincangkan menggunakan JPA untuk pemetaan objek-relasi dengan ciri-ciri canggih seperti caching dan pemuatan malas. Ia meliputi persediaan, pemetaan entiti, dan amalan terbaik untuk mengoptimumkan prestasi sambil menonjolkan potensi perangkap. [159 aksara]

Artikel ini membincangkan menggunakan Maven dan Gradle untuk Pengurusan Projek Java, membina automasi, dan resolusi pergantungan, membandingkan pendekatan dan strategi pengoptimuman mereka.

Artikel ini menerangkan NIO API Java untuk I/O yang tidak menyekat, menggunakan pemilih dan saluran untuk mengendalikan pelbagai sambungan dengan cekap dengan satu benang. Ia memperincikan proses, faedah (skalabilitas, prestasi), dan potensi perangkap (kerumitan,

Artikel ini membincangkan membuat dan menggunakan perpustakaan Java tersuai (fail balang) dengan pengurusan versi dan pergantungan yang betul, menggunakan alat seperti Maven dan Gradle.

Artikel ini memperincikan API soket Java untuk komunikasi rangkaian, yang meliputi persediaan pelanggan-pelayan, pengendalian data, dan pertimbangan penting seperti pengurusan sumber, pengendalian ralat, dan keselamatan. Ia juga meneroka teknik pengoptimuman prestasi, i
