Skip to content

java formatter not enabled to be used in jupyter notebooks #4163

Closed

Description

@maxandersen

I have redhat java extension installed but when calling format document on a jupyter notebook it keeps reporting it cannot find formatter for "java" files.

Image

is there some configuration needed to have vscode use the java formatter in jupyter notebooks?

Activity

  1. angelozerr commented on Sep 17, 2025

    @angelozerr
    Contributor

    @maxandersen are you sure that jdt ls suports notebook? I am not sure because if I remember notebook uses special file scheme.

  2. tsmaeder commented on Sep 17, 2025

    @tsmaeder
    Contributor

    @maxandersen a bit more info about your workspace/setup would be helpful.

  3. maxandersen commented on Sep 18, 2025

    @maxandersen
    ContributorAuthor

    @angelozerr i'm not saying jdt ls supports notebook - i'm saying that notebook reports no formatter for "java" is installed - hence I'm wondering why it says that because it seems jdt ls gets used everywhere else java code gets formatted in eclipse.

    @tsmaeder currently running cursor.ai, create a notebook using any of the kernels from github.com/jupyter-java - but specifically trying out jbang install-kernel@jupyter-java --java 25 jbang which lets you choose a kernel that has code segments written in java.

    but it fails the same using ijava, jjava, or others.

  4. snjeza commented on Sep 22, 2025

    @snjeza
    Collaborator

    Jupyter notebooks use the vscode-notebook-cell url scheme that Java LS doesn't recognize.
    @maxandersen Could you try VS Code Java 1.47.0 ?

  5. added this to the Early October 2025 milestone on Sep 30, 2025
  6. maxandersen commented on Oct 10, 2025

    @maxandersen
    ContributorAuthor

    thanks for adding this - it now does format.. but unfortunately the format is ..well ...lets just call it non-optimal :)

    opened #4207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions