1. Verify Java is installed
java -version
2. Download the IJava zip from GitHub
https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip
Extract to a folder, e.g. D:\IJava.
3. Install the kernel using the install script
Open terminal inside the extracted folder and run:
cd D:\IJava
python install.py
This installs the Java kernel into Jupyter (creates a kernel folder under C:\ProgramData\jupyter\kernels\java by default).
4. VS Code blocked the kernel as “untrusted”
Error shown:
The kernel 'Java' was not started as it is located in an insecure location 'C:\ProgramData\jupyter\kernels\java\kernel.json'.
Two ways to fix that:
1. Trust that specific kernel folder in VS Code settings (jupyter.kernels.trusted) — add the ProgramData path. (this did not work for me)
2. Move the kernel folder into your user Roaming path (what you did) so VS Code trusts it automatically.
So I moved the folder:
From:
C:\ProgramData\jupyter\kernels\java
To:
C:\Users\Admin\AppData\Roaming\jupyter\kernels\java
5. Fix the kernel.json path (critical)
After moving, the kernel still pointed to the old jar path, so Jupyter tried to run a jar that no longer existed.
Open:
C:\Users\Admin\AppData\Roaming\jupyter\kernels\java\kernel.json
Edit the "argv" entry so the -jar path points to the new location. Example final content we used:
{
"argv": [
"java",
"-jar",
"C:\\Users\\Admin\\AppData\\Roaming\\jupyter\\kernels\\java\\ijava-1.3.0.jar",
"{connection_file}"
],
"display_name": "Java",
"language": "java"
}
Make sure the jar filename and full path exactly match what’s in that folder.
6. Restart VS Code completely
(Not just reload — close and re-open). This makes VS Code pick up the updated kernel.
8. Select the Java kernel in the notebook