microsoft / microsoft/vscode-java-dependency

Need absolute path for third librairies

Open
#966 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug
Dominant language
TypeScript
Stars
199
Forks
105
Avg merge
1d 22h
Merged PRs (30d)
27

Description

I can't add manually my jar to my project in any way.

First, I made a lib folder and add on the configuration file :

{
    "java.compile.nullAnalysis.mode": "disabled",
    "java.project.referencedLibraries": [
        "lib/**/*.jar"
    ]
}

Didn't works, the jar is not referenced.

I tried to add it with the project setting pane, get an error :

!ENTRY org.eclipse.jdt.ls.core 4 2 2026-02-12 07:53:10.315
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ls.core".
!STACK 0
org.eclipse.jdt.internal.core.ClasspathEntry$AssertionFailedException: Path for IClasspathEntry must be absolute: lib/HyUI-0.8.4-all.jar
	at org.eclipse.jdt.core.JavaCore.newLibraryEntry(JavaCore.java:5430)
	at org.eclipse.jdt.ls.core.internal.commands.ProjectCommand.convertClasspathEntry(ProjectCommand.java:351)
	at org.eclipse.jdt.ls.core.internal.commands.ProjectCommand.updateClasspaths(ProjectCommand.java:244)
	at org.eclipse.jdt.ls.core.internal.JDTDelegateCommandHandler.executeCommand(JDTDelegateCommandHandler.java:104)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:618)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

!ENTRY org.eclipse.jdt.ls.core 4 0 2026-02-12 07:53:10.317
!MESSAGE Error in calling delegate command handler
!STACK 0
org.eclipse.jdt.internal.core.ClasspathEntry$AssertionFailedException: Path for IClasspathEntry must be absolute: lib/HyUI-0.8.4-all.jar
	at org.eclipse.jdt.core.JavaCore.newLibraryEntry(JavaCore.java:5430)
	at org.eclipse.jdt.ls.core.internal.commands.ProjectCommand.convertClasspathEntry(ProjectCommand.java:351)
	at org.eclipse.jdt.ls.core.internal.commands.ProjectCommand.updateClasspaths(ProjectCommand.java:244)
	at org.eclipse.jdt.ls.core.internal.JDTDelegateCommandHandler.executeCommand(JDTDelegateCommandHandler.java:104)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:618)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

The only solution/workaround I found, it's to put the jar outside of my project and use the project setting pane.

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

Reproduce the failure with a project-local lib/**/*.jar entry in java.project.referencedLibraries, then trace the reported ProjectCommand.java path conversion at line 351. Confirm how the project setting pane supplies the classpath and identify the boundary where the relative path is rejected. Done means a jar inside the project is accepted and referenced without the absolute-path exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.