IJava
IJava copied to clipboard
jupyter notebook webbased: NO java syntax highligting
I have installed this its very very useful
I want to know how to see syntax highlighting of my code.
I ran the command in my terminal
jupyter notebook
Then jupyter notebook opens and then i select Java shell
I see the java code without syntax highlighting. How to get the syntax highlighting
close and reopen the notebook, it worked for me
This happens because the notebook metadata is not populated with enough information when it is created.
"language_info": {
"name": ""
}
When you change the above to below, syntax highlighting starts to work.
"language_info": {
"name": "java"
}
This seem to be a pretty common problem in Jupyter. I've searched for it and Julia community has (or had) the same problem and there was a fix like that. See https://github.com/jupyterlab/jupyterlab/issues/6826#issue-467830861
A good fix should make sure that every notebook is created with proper metadata, but meanwhile you can quickly fix manually for each notebook you are using.
In case of Jupyter Lab there you can do this in the left sidebar. Go to the tools icon on the very right, expand the "Advanced Tools", and there you can edit the metadata.
Thank you, When i close and reopen the notebook, it worked for me
it woked.
Also i will try @kyagrd solution