最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】VSCode中参考java的官网教程确认调试环境配置是否正确

Java crifan 1215浏览 0评论
折腾:
【未解决】VSCode调试Java弹框提示:Maven executable not found in PATH Please specifiy maven.executable.path in Settings
期间,参考
Java in Visual Studio Code Getting started
去看看教程,如何开始
Java: Getting Started
打开了
去看看
另外也看到了:
Java Overview
左下角默认勾选了:Show overview page when using Java
Java in Visual Studio Code
发现就是上面看的文档
说了,如果目录中有pom.xml or build.gradle会自动加载
说明pom.xml or build.gradle是典型的项目配置文件
记得了:
  • Maven是pom.xml
  • Gradle是:build.gradle
“Why do I see the JDK errors?
JDK 8+ is required to run VS Code Java! You see this error because we failed to find one on your machine. The JDK Acquisition Guide can help you understand how JDK path is searched and provides download links if you need to install one.
Why do I see tons of problems and red squiggles?
The problems are from VS Code Java when it tries to compile and build your codebase. If you experience this on your first use, it’s possibly because of missing dependencies. To fix it, you probably want to start from fixing the project configuration files, e.g. pom.xml and build.gradle. After you make changes to those files, try Update Project Configuration and Force Compilation.
It can also happen after you work with one project for a while. Try Clean Workspace to get rid of any intermediate output from the language server.
If the problem persists, follow the Troubleshooting Guide. For advanced users, the Client Logs and Server Logs will definitely help you understand what is going on.”
vscode Java Getting Started
Writing Java with Visual Studio Code
此处去点击看看
JDK Acquisition Guide
进入:
Java Development Kit
显示当前JAVA_HOME是空的?
不对啊,之前已经加到启动脚本中,不应该空才对
去VSCode中的终端看看:
➜  xxx echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
是非空的。
但是此处不知道为何检测出JAVA_HOME是空的
不过倒是current显示值是对的
此处是没问题的。
感觉现在问题变成:
【已解决】VSCode中调试Java用maven的pom.xml还是gradle的build.gradle
接着就是:
【未解决】VSCode中如何安装gradle和配置build.gradle

转载请注明:在路上 » 【记录】VSCode中参考java的官网教程确认调试环境配置是否正确

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.160 seconds, using 22.15MB memory