redhat-developer / redhat-developer/vscode-java

Build path error

Open
#3,866 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Hi, I have a problem about build directory.

cd /home/ray/dev/JavaProject ; /usr/bin/env /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp /home/ray/.vscode-server/data/User/workspaceStorage/154ea3c966ddc0a55d55766b94e4cd89/redhat.java/jdt_ws/jdt.ls-java-project/bin App

This command run when I open the java project in workspace and click Run.

usr/bin/env /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp /home/ray/dev/JavaProject/originaldemo/bin App

This command run when I open the project individually rather than in a workspace and click Run.

Image
The directory structure when opened from the workspace, springdemo is another java project

Image
Directory structure when opened separately

I can use "java.project.outputPath" option to set build directory in file JavaProject.code-workspace and it works. However, I want to set the build directory of each project in the workspace to the root directory of the project instead of the only directory of the workspace and I set this option in file settings.json under folder .vscode in this project, but this setting doesn't seem to work.

So, I want to build and run the java project using the build directory I set up for each project in my workspace instead of using the default directory under .vscode-server or the only directory of the workspace. How should I set it up to serve my purpose or is this a bug?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the workspace file JavaProject.code-workspace and the per-project .vscode/settings.json, comparing how java.project.outputPath is applied when projects are opened together or separately. Reproduce the Run action with the shown project layout; done means each workspace project uses its own configured output directory rather than the shared .vscode-server path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.