Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.
This repository was archived by the owner on Jul 2, 2026. It is now read-only.

Run in Java editor fails #80

Open
Open

Description

@vorburger

When I open code java_one/ of https://github.com/vorburger/LearningBazel, it opens just fine (see #74).

However clicking Run (the gray "hover" thing, of Run | Debug) says Build failed, do you want to continue? (from Source: Debugger for Java)

There are no related errors in the usual Troubleshooting logs (that I could see).

With this extension, is this a "bug" because @guw this works for you in other projects, or is it "totally expected" and so this just a possible future Frequent Request (FR)?

BTW that Bazel Run Targets tab in the Explorer view is also empty... should there be something there, given the java_binary(name = "JavaOne", ... of that small sample project?

Activity

  1. guw commented on Jan 6, 2024

    @guw
    Contributor

    I think for the Bazel Run Targets we rely on importing IJ run configurations. @lonhutt do you know if this works with arbitrary java_binary targets`

  2. vorburger commented on Apr 14, 2024

    @vorburger
    ContributorAuthor

    @guw just FYI (#111 is more important) when I press the Run | Debug on https://github.com/enola-dev/enola/blob/e6240391f16815c0b30e9c0ab10def17aff786e7/tools/hello/src/main/java/dev/enola/common/hello/Hello.java then the Terminal has:

    cd /home/vorburger/git/github.com/en
    ola-dev/enola ; /usr/bin/env /usr/lib/jvm/java-21-openjdk-21.0.2.0.13-1.fc39.x86_64/bin/java -agentlib:jdwp=transport=dt_socke
    t,server=n,suspend=y,address=localhost:33795 @/tmp/cp_5j8filafnox1ol2nueofo8mx9.argfile dev.enola.common.hello.Hello
    Error: Could not find or load main class dev.enola.common.hello.Hello
    Caused by: java.lang.ClassNotFoundException: dev.enola.common.hello.Hello

    So it looks like it's not putting anything on the -cp ...

  3. vorburger commented on Apr 14, 2024

    @vorburger
    ContributorAuthor

    It seems to create a new .vscode/launch.json (which I didn't have before) which contains, among other things:

    {
          "type": "java",
          "name": "Hello",
          "request": "launch",
          "mainClass": "dev.enola.common.hello.Hello",
          "projectName": "tools.hello:hello"
        }
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions