René's URL Explorer Experiment


Title: Windows 长 classpath:由插件生成 @argfile,经 run/start 的 temporaryFiles base64 交给宿主 · Issue #7 · Lithe-IDEA/lithe-plugin-java · GitHub

Open Graph Title: Windows 长 classpath:由插件生成 @argfile,经 run/start 的 temporaryFiles base64 交给宿主 · Issue #7 · Lithe-IDEA/lithe-plugin-java

X Title: Windows 长 classpath:由插件生成 @argfile,经 run/start 的 temporaryFiles base64 交给宿主 · Issue #7 · Lithe-IDEA/lithe-plugin-java

Description: 要解决的问题 Windows 的 CreateProcess 命令行上限是 32,767 个 UTF-16 码元。依赖多的 Java 项目,classpath 很容易超过这个长度,java 会启动失败。 这件事以前由宿主兜底: 桌面端 desktop/internal/pluginservice/runs.go 在处理每个非调试的 run/start 时,调用 Core 的 execution.planLaunchCommand。 如果启动的是 JDK 9 及以上的 j...

Open Graph Description: 要解决的问题 Windows 的 CreateProcess 命令行上限是 32,767 个 UTF-16 码元。依赖多的 Java 项目,classpath 很容易超过这个长度,java 会启动失败。 这件事以前由宿主兜底: 桌面端 desktop/internal/pluginservice/runs.go 在处理每个非调试的 run/start 时,调用 Core 的 executio...

X Description: 要解决的问题 Windows 的 CreateProcess 命令行上限是 32,767 个 UTF-16 码元。依赖多的 Java 项目,classpath 很容易超过这个长度,java 会启动失败。 这件事以前由宿主兜底: 桌面端 desktop/internal/pluginservice/runs.go 在处理每个非调试的 run/start 时,调用 Core 的 executio...

Opengraph URL: https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Windows 长 classpath:由插件生成 @argfile,经 run/start 的 temporaryFiles base64 交给宿主","articleBody":"## 要解决的问题\n\nWindows 的 `CreateProcess` 命令行上限是 32,767 个 UTF-16 码元。依赖多的 Java 项目,classpath 很容易超过这个长度,`java` 会启动失败。\n\n这件事以前由宿主兜底:\n\n- 桌面端 `desktop/internal/pluginservice/runs.go` 在处理每个非调试的 `run/start` 时,调用 Core 的 `execution.planLaunchCommand`。\n- 如果启动的是 JDK 9 及以上的 `java`,并且命令行超长,Core 会把 `-cp` / `-classpath` / `--class-path` / `-p` / `--module-path` 的值移进 `@argfile`。\n- 桌面端再按系统 ANSI 代码页写出这个文件(`argfile_encoding_windows.go`)。\n\nCore 必须对 Java 零依赖、零特判,所以 Lithe-IDEA/Lithe-core-rust 分支 `refactor/core-remove-java-special-cases` 已经删除了 `execution.planLaunchCommand`。桌面端的 `launch_plan.go`、`runargs.go`、`argfile_encoding_*.go` 也会随之删除。之后宿主会原样启动插件给的命令行。\n\n`backend/src/run.rs:34` 的说明是 “Long command lines are passed as they are”。这句话在 macOS 上成立,但在 Windows 上,长 classpath 的运行和测试会直接失败。\n\n## 建议方案\n\n由插件后端自己生成参数文件,交给 `run/start` 的 `temporaryFiles`。Core 在同一个分支里给 `temporaryFiles` 增加了 `{name, base64}` 形式:宿主按给定字节原样写出,不做转码。规则如下:\n\n- 每项要么是 `{name, contents}`(UTF-8 文本),要么是 `{name, base64}`(字节)。同时给出两者或两者都不给,都会被拒绝。\n- 最多 4 个文件,每个不超过 4 MiB。\n- 参数里写 `${temporaryFile:\u003cname>}`,宿主会替换成实际路径。\n\n插件里已经有可以直接用的部分(`origin/HEAD` 28628cb):\n\n- `crates/java-domain/src/execution/launch_command.rs` 的 `plan_launch_command`:从 Core 移植过来,负责判断是否需要参数文件、把哪些选项移进文件,以及如何加引号。它已经作为同名插件函数 `execution.planLaunchCommand` 注册在 `backend/src/lib.rs` 里。\n- `crates/java-domain/src/execution/argfile.rs`:读取 JDK 的 `release` 文件得到主版本号,并写出参数文件。\n- `crates/java-domain/src/execution/classpath_jar.rs`:给 JDK 8 用的、只含清单的 classpath JAR。\n\n缺的是两件事:\n\n- 运行和测试流程(`backend/src/run.rs`)没有调用上面这些代码;\n- 没有按 Windows 代码页编码参数文件。\n\n插件需要:\n\n1. 在 `backend/src/run.rs` 生成 `run/start` 请求之前调用 `plan_launch_command`。命令行超过 Windows 上限时,把生成的文件放进 `temporaryFiles`,参数里写 `${temporaryFile:\u003cname>}`,不再自己选目录写文件。插件现在还没有自己的临时目录,见 `argfile.rs` 顶部的 `TODO(host-api: API-20 storage)`。\n2. Windows 上按系统 ANSI 代码页编码参数文件,规则是:调用 `GetACP` 取得代码页,再用 `WideCharToMultiByte` 并带上 `WC_NO_BEST_FIT_CHARS` 转换;代码页里放不下的字符直接报错,不做替换;双字节字符的尾字节如果是 `0x5C`(`\\`),要再写一个 `0x5C`;代码页是 65001 时直接写 UTF-8。编码结果以 `{name, base64}` 交给宿主。可以参考将被删除的 `desktop/internal/pluginservice/argfile_encoding_windows.go`。\n3. JDK 8 的 classpath JAR 也可以用 `{name, base64}` 交给宿主,单个文件不能超过 4 MiB。\n4. macOS 和 Linux 上,命令行没有超长时维持现状。如果需要参数文件,用 UTF-8 的 `{name, contents}`。\n5. 同步修改 `backend/src/run.rs:34` 的 “Not yet covered” 说明和 README 的日志表。表里的 `execution.planLaunchCommand` 是插件自己的函数,不是 Core 命令。\n6. 测试至少覆盖:\n   - 超长 classpath 会生成参数文件;\n   - 未超长时不生成;\n   - JDK 8 走 classpath JAR;\n   - 非 ASCII 路径;\n   - 双字节代码页下的尾字节加倍。\n\n## 迁移顺序\n\n- 合并顺序是:Core PR 先合入;桌面端删除兜底、并支持写出 `base64` 临时文件的 PR 再合入;最后本插件发布支持 argfile 的版本。\n- 在本插件发版之前,Windows 上的长 classpath 运行会失败。目前 Viva 桌面端在 Windows 上仍处于迁移验证阶段。\n\n## 其他\n\nCore 的模板值 `${field.\u003cruntime>.major}` 现在取版本号的第一个数字分量:`1.8.0_412` 得到 `1`,`17.0.2` 得到 `17`。本插件的 `${field.jdk.major}` 只用在 `minimumVersion: 17` 的 JDK 字段上,不受影响。如果以后要支持 JDK 8 的选择,需要在插件里自己换算 `1.x`。\n","author":{"url":"https://github.com/xiaoyumuxi","@type":"Person","name":"xiaoyumuxi"},"datePublished":"2026-11-13T15:25:29Z","url":"https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:775dd6e1-3b2e-9662-5ea8-2ea000976d26
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idABA4:26661B:591945:7E8467:6B070A7F
html-safe-nonce391d82ad4cd8b84aa30407bf52445a3fa8592d62f8c0f3315291cad0c0a7ee4d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkE0OjI2NjYxQjo1OTE5NDU6N0U4NDY3OjZCMDcwQTdGIiwidmlzaXRvcl9pZCI6IjMzMDI3MDk0MDg2NTE3NDE4MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf9b1e8b5e18eaea9ba71c3dbfdce542ab35c0d9a7ef7b07b0401af174dd91237
hovercard-subject-tagissue:6374400142
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Lithe-IDEA/lithe-plugin-java/7/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e53d7b132d35d4eaced3fdb4415b80d79a1bfcf6a57446302c43375d49699bf5/Lithe-IDEA/lithe-plugin-java/issues/7
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e53d7b132d35d4eaced3fdb4415b80d79a1bfcf6a57446302c43375d49699bf5/Lithe-IDEA/lithe-plugin-java/issues/7
og:image:alt要解决的问题 Windows 的 CreateProcess 命令行上限是 32,767 个 UTF-16 码元。依赖多的 Java 项目,classpath 很容易超过这个长度,java 会启动失败。 这件事以前由宿主兜底: 桌面端 desktop/internal/pluginservice/runs.go 在处理每个非调试的 run/start 时,调用 Core 的 executio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamexiaoyumuxi
hostnamegithub.com
expected-hostnamegithub.com
None9aaa1abe1aaef39a8543ab08df7a776c3243275815d741d29afa7b02148ca05e
turbo-cache-controlno-preview
go-importgithub.com/Lithe-IDEA/lithe-plugin-java git https://github.com/Lithe-IDEA/lithe-plugin-java.git
octolytics-dimension-user_id340144206
octolytics-dimension-user_loginLithe-IDEA
octolytics-dimension-repository_id1446370282
octolytics-dimension-repository_nwoLithe-IDEA/lithe-plugin-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1446370282
octolytics-dimension-repository_network_root_nwoLithe-IDEA/lithe-plugin-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c43783771de038e2c401dd343799000e8d1253
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/7#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2Flithe-plugin-java%2Fissues%2F7
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2Flithe-plugin-java%2Fissues%2F7
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Lithe-IDEA%2Flithe-plugin-java
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/7
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/7
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/7
Lithe-IDEAhttps://github.com/Lithe-IDEA
lithe-plugin-javahttps://github.com/Lithe-IDEA/lithe-plugin-java
Codehttps://github.com/Lithe-IDEA/lithe-plugin-java
Issues3 (3)https://github.com/Lithe-IDEA/lithe-plugin-java/issues
Pull requests1 (1)https://github.com/Lithe-IDEA/lithe-plugin-java/pulls
Actionshttps://github.com/Lithe-IDEA/lithe-plugin-java/actions
Projectshttps://github.com/Lithe-IDEA/lithe-plugin-java/projects
Security and qualityhttps://github.com/Lithe-IDEA/lithe-plugin-java/security
Insightshttps://github.com/Lithe-IDEA/lithe-plugin-java/insights
https://github.com/Lithe-IDEA/lithe-plugin-java
New issuehttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7
New issuehttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7
Windows 长 classpath:由插件生成 @argfile,经 run/start 的 temporaryFiles base64 交给宿主https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7#top
enhancementhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/xiaoyumuxi
xiaoyumuxihttps://github.com/xiaoyumuxi
on Nov 13, 2026https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7#issue-6374400142
28628cbhttps://github.com/Lithe-IDEA/lithe-plugin-java/commit/28628cbd8d60b657de7f3c74ab3b232ebddfc5cc
xiaoyumuxihttps://github.com/xiaoyumuxi
enhancementhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Nov 13, 2026https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7#event-36043973670
https://github.com/xiaoyumuxi
xiaoyumuxihttps://github.com/xiaoyumuxi
on Nov 13, 2026https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7#issuecomment-6857875843
feat(core)!: 删除 Java/Maven/JDT 特判与契约专属死命令,run/start 临时文件支持 base64 Lithe-core-rust#23https://github.com/Lithe-IDEA/Lithe-core-rust/pull/23
refactor(desktop): 删除 Core 的 Java 启动规划,run/start 临时文件支持 base64 字节 1lck/Lithe-IDEA#1859https://github.com/1lck/Lithe-IDEA/pull/1859
#23https://github.com/Lithe-IDEA/lithe-plugin-java/pull/23
Sign up for freehttps://github.com/signup?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7
Sign in to commenthttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/7
enhancementhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.