VS code unable to create new cell while using iJAVA that is build on jshell?

802 views Asked by At

I am just a beginner :)
Can any one help me out??

When I click the plus sign to create a new cell in a workbook I get an error. The new cell isn't created and I see this error message in a larger than usual font.

The error message survives a restart of the kernel.

The error is gone after I restart VSCode.

The error is also gone after I save / close the file and re-open it.

code

System.out.print("hello jshell");

and then i hit alt + enter

output

hello jshell

TypeError: Cannot read property 'charAt' of undefined at 

in t
in div
in t
in div
in t
in div
in t
in div
in div
in div
in div
in div
in div
in t
in h
in t
in div
in div
in div
in t
in main
in div
in t
in h
in f

I am using

  • VS-code version : 1.51.1
  • jupyter core : 4.6.3
  • jupyter-notebook : 6.1.5
  • qtconsole : 4.7.7
  • ipython : 7.18.1
  • ipykernel : 5.3.4
  • jupyter client : 6.1.7
  • jshell : 15.0.1

out put screen shot

1

There are 1 answers

1
Molly Wang-MSFT On

I've added the java to Jupyter Kernel and with many tests conducted, it's an issue in VS Code:

Error in VS Code

There're many similar issues posted in GitHub and now, this function is solved in VS Code Insiders but still not in VS Code:

Run well in VS Code Insiders

You can install VS Code Insider, but it may not that stable, after all it's the beta-version of VS Code. In another way, you can turn to JupyterLab, try it in browser or install it.

enter image description here