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.
1 Answer
This is specified by the Java language. When you run java files, class files will be automatically generated in the current directory.
`"java.project.outputPath": "bin"`
and
"java.project.sourcePaths": [
"src"
],
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.
2 Comments
mexicanburrito
I tried deleting all of the class files in src and bin and I reopened the project, and it still didn't work. I then tried just deleting the class files in src, and then just bin, but that didnt work either
MingJie-MSFT
@mexicanburrito Are you using the tool architecture to build the project? I suggest you using tool to creat project. code.visualstudio.com/docs/java/java-project If this still doesn't work, you can submit it as a bug to github.


{ }. Why should I not upload images of code/data/errors when asking a question?