Skip to content

Java Support v3.0.1

Choose a tag to compare

@github-actions github-actions released this 17 Nov 05:54
· 18 commits to main since this release
242def0

Java 3.0.1

中文

没有 Maven 或 Gradle 的老项目和从其他 IDE 迁来的项目,现在打开就能编译:插件只读识别项目里已有的工程结构,在内存中补全类路径,不修改任何项目文件(1lck/Lithe-IDEA#2063)。

新功能

  • Eclipse WTP 与 MyEclipse:.classpath 中的 Web App Libraries(WEB-INF/lib 及部署进去的工具模块)、EAR Libraries(EAR 的库目录和 MANIFEST.MF 的 Class-Path)、Server Runtime 和 MyEclipse 的 J2EE/Java EE 库容器,以及 TOMCAT_HOME、CATALINA_HOME 类路径变量,由插件自带的 JDT LS 扩展包解析,不再出现 “Unbound classpath container” 导致整个项目无法构建。
  • IntelliJ IDEA:读取 .idea/modules.xml(或 .ipr)和各模块的 .iml,导入非标准的源码文件夹、模块库、.idea/libraries 中的项目库和 jarDirectory。
  • 传统 Web 项目:只有 WebContent/WebRoot 下 WEB-INF/lib 的目录,以及 EAR 的库目录和 MANIFEST.MF 的 Class-Path。
  • Servlet 容器:Web 项目需要的 javax.servlet 等 API 自动来自本机的 Tomcat 或 Jetty:先用新设置“Servlet 容器文件夹”,再用 CATALINA_HOME/TOMCAT_HOME,最后在常见安装位置查找,并优先选择项目点名的版本。
  • “Java 库”设置页新增只读的“工程模型”分组,列出识别到的模型、自动加入的库、Servlet 容器、Eclipse 容器的解析结果和无法解析的条目及原因;普通文件夹新增“源码文件夹”和“将识别结果保存到此文件”,可以把识别结果写进 .vscode/settings.json 与其他编辑器共享。

Maven 和 Gradle 项目不受影响,.vscode/settings.json 中的显式配置始终优先。新设置“Java → 工程模型 → 自动识别工程模型”可以整体关闭。详见 docs/project-models.md。

兼容性

宿主要求与 3.0.0 相同。扩展包随插件一起加载到你安装的 JDT LS 中,已在 JDT LS 1.61.0 上验证。


English

Legacy projects without Maven or Gradle, and projects coming from other IDEs, now compile when opened: the plugin reads the project layout already on disk and completes the classpath in memory, without changing any project file (1lck/Lithe-IDEA#2063).

New

  • Eclipse WTP and MyEclipse: the Web App Libraries (WEB-INF/lib and utility modules deployed into it), EAR Libraries (the EAR library folder and MANIFEST.MF Class-Path), Server Runtime and MyEclipse J2EE/Java EE library containers in .classpath, and the TOMCAT_HOME and CATALINA_HOME classpath variables, are resolved by the plugin's own JDT LS extension bundle. "Unbound classpath container" no longer blocks the whole project.
  • IntelliJ IDEA: .idea/modules.xml (or a .ipr) and each module's .iml provide non-standard source folders, module libraries, project libraries from .idea/libraries, and jarDirectory entries.
  • Legacy web projects: folders with only WEB-INF/lib under WebContent/WebRoot, EAR library folders and MANIFEST.MF Class-Path.
  • Servlet container: javax.servlet and the other server APIs come from a local Tomcat or Jetty: the new Servlet container folder setting, then CATALINA_HOME/TOMCAT_HOME, then standard installation folders, preferring the version the project names.
  • The Java Libraries settings page gains a read-only Project model group listing the detected model, added libraries, the servlet container, how Eclipse containers resolved, and entries that cannot be resolved with the reason. Plain folders gain Source folders and Save detected entries to this file, which writes the detected entries to .vscode/settings.json for other editors.

Maven and Gradle projects are unchanged, and explicit values in .vscode/settings.json always come first. Turn detection off with Java → Project model → Detect project models. See docs/project-models.md.

Compatibility

Host requirements are the same as 3.0.0. The extension bundle is loaded into your own JDT LS with the plugin and is verified on JDT LS 1.61.0.

SHA-256

e19fb2d5ac63484b88c61c4ca222398fafa9cd52e2715213dc36df45b3de1fea  Lithe-Java-Support-3.0.1-darwin-arm64.zip
e48c4657690e2ca49c1c23dbfa7fe75d8b2a344329ef33f76b30e341aa2f573a  Lithe-Java-Support-3.0.1-darwin-x64.zip
9eefc2d78e3fc9158764e6f0e0b50938881576e6a6e8ca31d01095c35607cf03  Lithe-Java-Support-3.0.1-windows-x64.zip
d83b579a8204fa956e1686bb126d5f0c7ac4ddb47731014ffe4d4f8b900c141a  Lithe-Java-Support-3.0.1-linux-arm64.zip
dd2a71b21e51f0de7af2d9f0c15b86ade93cc035d067106829394bc48551f40c  Lithe-Java-Support-3.0.1-linux-x64.zip