我试图在Visual Studio代码中调试java应用程序并获得以下错误:"Error:spawn jdb ENOENT".
Vs Code建议更新我的启动。
{
"version": "0.2.0",
"configurations": [
{
"name": "Java",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"cwd": "${fileDirname}",
"startupClass": "${fileBasename}",
"options": [
"-classpath",
""${fileDirname};.""
]
},
{
"name": "Java Console App",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"cwd": "${fileDirname}",
"startupClass": "${fileBasename}",
"options": [
"-classpath",
""${fileDirname};.""
],
"externalConsole": true
}
]
}
我正在使用maven构建,并安装了以下VSCode插件https://github.com/DonJayamanne/javaVSCode。
Maven pow.xml<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ams-sample</groupId>
<artifactId>AMSSample</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>NumberGenerator</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
<version>4.0.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/azure-storage-4.0.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-core</artifactId>
<version>0.9.4</version>
<scope>system</scope>
<systemPath>${basedir}/lib/azure-core-0.9.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-media</artifactId>
<version>0.9.4</version>
<scope>system</scope>
<systemPath>${basedir}/lib/azure-media-0.9.0.jar</systemPath>
</dependency>
</dependencies>
</project>
我现在的假设是VS Code无法找到jdbc .exe,我正试图找到它应该配置的位置
问题与缺少指向C:Program FilesJavajdk1.8.0_102bin
的%PATH%有关。一旦系统变量%PATH%被修改为包含C:Program FilesJavajdk1.8.0_102bin
VS Code启动的java调试器