终端中的 Visual Studio Code Java 路径 [英] Visual Studio Code Java paths in terminal
问题描述
我刚开始使用 Visual Studio Code 并在 Java 中创建了一个简单的 Hello World 程序,它会像预期的那样打印 Hello World
,但我也得到了一些类似 /usr/lib/的路径jvm/java-11-openjdk-amd64/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:40999 -Dfile.encoding=UTF-8 -cp "/home/local_user/.config/Code/User/workspaceStorage/d9ee39ad9a8fac4ef166558e8c8af01f/redhat.java/jdt_ws/Java Programs_514b41ed/bin"测试
Test 是我的 .java 文件的名称.有没有办法禁用它?
I just started using Visual Studio Code and created a simple Hello World program in Java and it prints Hello World
like its supposed to but I also get some paths like /usr/lib/jvm/java-11-openjdk-amd64/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:40999 -Dfile.encoding=UTF-8 -cp "/home/local_user/.config/Code/User/workspaceStorage/d9ee39ad9a8fac4ef166558e8c8af01f/redhat.java/jdt_ws/Java Programs_514b41ed/bin" Test
with Test being the name of my .java file. Is there a way to disable this?
推荐答案
我也没有找到隐藏路径的设置,而是将其设置为在 DebugConsole
中输出作为解决方法,然后它不会显示路径.
I also didn't find the Settings to hide the path, but set it to output in the DebugConsole
as a workaround,then it would not displaye the path.
在您的 launch.json
中添加 "console": "internalConsole"
像:
add "console": "internalConsole"
in your launch.json
like :
"configurations": [
{
"type": "java",
"name": "CodeLens (Launch) - App",
"request": "launch",
"mainClass": "com.test.maven.App",
"console": "internalConsole",
"projectName": "my.app"
}
]
这篇关于终端中的 Visual Studio Code Java 路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!