redhat-developer / redhat-developer/vscode-java
argfile path incorrectly passed to shell
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Type: Bug
When running SpringBoot application the argfile is generated correctly but wrongly passed to shell so java fails saying the argfile in not found.
When I press Run on Spring Application:
Sun 19 Jan 2025 17:29:17 AEDT
/usr/bin/env /Library/Java/JavaVirtualMachines/amazon-corretto-21.jdk/Contents/Home/bin/java @/var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile com.example.Application
example ❯ /usr/bin/env /Library/Java/JavaVirtualMachines/amazon-corretto-21.jdk/Contents/Home/bin/java @/var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxymno1ghwdpwvy9zj.ar
gfile com.example.Application
Error: could not open `/var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxymno1ghwdpwvy9zj.argfile'
The correct (existing) file is cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile while what is passed to the command is cp_6p5jtxymno1ghwdpwvy9zj.argfile. As we can see some characters ('jka') is removed from the file name.
My work around was to create a symbolic link to from wrong file to the correct file and the am able to run/debug now.
-rw-r--r-- 1 ali staff 7.1K 19 Jan 17:23 /var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile
lrwxr-xr-x 1 ali staff 85B 19 Jan 17:22 /var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxymno1ghwdpwvy9zj.argfile -> /var/folders/gj/169h7wq975b_6l3c0v687wz40000gn/T/cp_6p5jtxjkaymno1ghwdpwvy9zj.argfile
Extension version: 1.39.2025011708
VS Code version: Code 1.96.4 (Universal) (cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba, 2025-01-16T00:16:19.038Z)
OS version: Darwin arm64 24.1.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 2400) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 16.00GB (0.13GB free) |
| Process Argv | . |
| Screen Reader | no |
| VM | 0% |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by using Run on a Spring Application on macOS and compare the generated argfile path with the path passed to Java. Trace the argfile generation and launch path; done means the existing argfile path is passed unchanged and the application starts without the workaround symlink.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100