Skip to content

Commit 0950275

Browse files
authored
Merge pull request #478 from shivam71/notebook_readme_update
README update for Java Notebooks and JShell
2 parents 87707e0 + e8a4232 commit 0950275

File tree

5 files changed

+37
-0
lines changed

5 files changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ In the VS Code command palette :
5151
* Java - broad selection of various predefined Java classes
5252
* Unit tests - JUnit and TestNG templates for test suites and test cases
5353
* Other - various templates for Javascript, JSON, YAML, properties, ... files
54+
* __Java: Create New Notebook...__ command to create a new [Java notebook](#interactive-java-notebooks)(`.ijnb` file)
55+
* __Java: Open JShell...__ command to open [JShell](#jshell) .
5456
* __Java: Compile Workspace__ - invoke Maven or Gradle build
5557
* __Java: Clean Workspace__ - clean Maven or Gradle build
5658
* __Download, install and Use JDK__ - allows download and installation of JDK binaries
@@ -63,6 +65,41 @@ In the VS Code command palette :
6365
Project Explorer provides an overview of logical project structure, groups sources together and greatly simplifies Java package structure exploration. Project Explorer is an addition to the classical workspace explorer. Use it to build, test, execute and operate your Maven and Gradle Java projects.
6466
![Project Explorer](vscode/images/project-explorer.png)
6567

68+
## Interactive Java Notebooks
69+
### Introduction
70+
* Experience interactive coding with Java notebooks.
71+
Use the __Java: Create New Notebook...__ command to create a new Java notebook(`.ijnb` file)
72+
![Java Notebook](vscode/images/java_notebook.gif)
73+
* Jupyter-style notebooks let you combine Java code snippets with markdown-formatted text cells.
74+
* Run individual code cells or execute the entire notebook.
75+
* Save outputs alongside code cells.
76+
* Sharing notebooks
77+
* Share as `.ijnb` files for use with Oracle Java extension.
78+
* Rename with `.ipynb` for viewing in other IDEs Jupyter etc.
79+
* Download the [sample notebooks](https://github.com/oracle/javavscode/blob/main/samples/notebooks) and open in VSCode to get started.
80+
81+
### Java Notebooks for Java Projects
82+
* Document Java projects with interactive Java notebooks.
83+
* Open/Create a Java notebook in your workspace folder loaded with classes from your project.
84+
![Java Notebook For Project](vscode/images/project_notebook.gif)
85+
* Use `Project Context` options incase you want to change to a different project context .
86+
![Switch Project Context](vscode/images/project_context.png)
87+
* Provide code snippets, markdown explanations, and expected outputs.
88+
89+
### Notebook Configurations
90+
* Following configuration settings are available
91+
* `jdk.notebook.classpath`
92+
* `jdk.notebook.modulepath`
93+
* `jdk.notebook.addmodules`
94+
* `jdk.notebook.enablepreview`
95+
* `jdk.notebook.implicitimports`
96+
* Note : These settings *override* any settings inferred from project context 
97+
98+
## JShell
99+
* Use the __Java: Open JShell...__ command to open JShell .
100+
* Project classes from currently open project are automatically loaded.
101+
![JShell](vscode/images/jshell.gif)
102+
66103
## Debugger and Launch Configurations
67104
Language Server __Java+ ...__ launch configuration supports debugging and running Java applications using JDK11 or newer.
68105
1. The launch configuration (debugger) is invoked when `Run main | Debug main` codelens is selected in the code.

vscode/images/java_notebook.gif

101 KB
Loading

vscode/images/jshell.gif

533 KB
Loading

vscode/images/project_context.png

10.9 KB
Loading

vscode/images/project_notebook.gif

254 KB
Loading

0 commit comments

Comments
 (0)