Skip to content

[BUG]: maven使用 vfox的 java会有 ct.sym 错误 #684

Description

@zhao-wuyan

Version
1.0.11
OS
Windows

Describe the bug
默认 Maven 的问题是 Java 8 javac 通过 vfox junction ~.vfox\sdks\java 访问 lib\ct.sym 失败。注册表中的 junction
兜底已保留,没有固定到某个 Java 版本。

让 AI 修,AI 修改了 PowerShell profile:

  • 保留 vfox activate pwsh。
  • 启动时及每次 prompt 从 vfox env --json 获取当前版本的物理 cache 路径,并覆盖当前会话的 JAVA_HOME。
  • 实测局部选择 Java 21 时自动切到 v-21.0.2+13;回到项目后自动恢复 Java 8。
  • 新 PowerShell 中 Maven 使用物理 Java 8 路径,重新编译成功,不再出现 ct.sym 错误。

Screenshots[optional]

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions