Skip to content

.java is not on the class path of project A, only syntax errors are reported #143

@AnqiHuangQiQi

Description

@AnqiHuangQiQi

This is from one of the Java files which is covered by Bazel targets listed in .bazelproject.
Image

This is from the Open All Java Logs in Vscode.

Image

From OUTPUT window, I saw "Bazel build with aspects".
Image

Also saw correct class paths from the OUTPUT.

Result: {
    "projectRoot": "file:/myjava",
    "classpaths": [

My Java project structure

Root
-WORKSPACE
-java/B/C: Bazel BUILD file
-java/B/D: Bazel BUILD file

For .bazelproject, I have tried

directories:
  java 
//or java/B/C

derive_targets_from_directories: true
directories:
  java 
//or java/B/C

derive_targets_from_directories: false

targets:
  //java/B/C:all

Also tried updating the .classpath file by adding some

<classpathentry kind="src"...

None of these could solve the issue.

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