vscode将java .class文件放在src文件夹中
每当我运行main.java
文件时,类文件都会生成我的bin
文件夹和到我的src
文件夹。我已经尝试配置settings.json
文件和设置“ java.project.outputpath”
“ bin”
。此后,我在命令调色板中进行了清洁Java语言服务器工作区,但仍然没有用。 我感谢所有帮助。谢谢。
Whenever I run my Main.java
file, class files get generated into my bin
folder and to my src
folder. I've tried configuring the settings.json
file and setting "java.project.outputPath"
to "bin"
. After this, I did Clean Java Language Server Workspace in the Command Palette, but it still didn't work.
Id appreciate all and any help. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是由Java语言指定的。运行Java文件时,将在当前目录中自动生成类文件。
在您的设置中。json表示使用此工作空间时,源路径中的Java文件将为您编译为类文件并存储在输出路径中。
您可以尝试删除所有.class文件并重新打开项目。您会发现所有类文件将自动加载在bin目录中。
This is specified by the Java language. When you run java files, class files will be automatically generated in the current directory.
in your setting.json means when you use this workspace, the java file in the source paths will be compiled into a class file for you and stored in the output paths.
You could try to delete all .class files and reopen the project. You will find that all class files will be loaded automatically in the bin directory.