I give a computer programming course I have written, and I recently switched to recommending Visual Studio Code in the course. We are starting out with the basics, so I just wanted a simple editor. We started learning Git, and one student's repository suddenly had all sorts of cruft in it, including:
.settings/
.vscode/
.classpath
.project
In particular the .settings
directory had all sorts of Eclipse settings, such as I would expect to see in an Eclipse project.
The student explained to me that these came from VS Code after installing its Java extensions. But why are the VS Code Java extensions creating Eclipse files? And where is all this documented, so that I can update my lessons with the exact details and avoid this problem in the future?
Thanks in advance.
The Remote Development extensions let you use VS Code to access a container, a remote machine, or the Windows Subsystem for Linux. You can use Docker extension to build docker images and work with image registries. Kubernetes extension provides an Explorer view to manage clusters and the nodes inside.
The source code file has file extension ". java". This is the file that is converted into the Java bytecode file, also called the class file.
Working with Java source files#You can use VS Code to read, write, run, and debug Java source file(s) without creating a project. VS Code for Java supports two modes, lightweight and standard.
VS Code extensions let you add languages, debuggers, and tools to your installation to support your development workflow. VS Code's rich extensibility model lets extension authors plug directly into the VS Code UI and contribute functionality through the same APIs used by VS Code.
Simplified the Language Support for Java™ by Red Hat is the headless Eclipse Java IDE integrated into Visual Studio Code via the Language Server Protocol (LSP). See the self-description of the extension:
Provides Java™ language support via Eclipse JDT Language Server, which utilizes Eclipse JDT, M2Eclipse and Buildship.
Except for .vscode/
, the mentioned files are Eclipse Java IDE files.
Because in Eclipse these files are not intended to be edited manually, there is little or no documentation about them (the Java compiler settings in .settings/org.eclipse.jdt.core.prefs
are similar to the command line arguments of the Eclipse batch compiler).
For example, the documentation of the Java extension recommends using the Eclipse Java IDE to edit the formatter settings (which are also stored in .settings/org.eclipse.jdt.core.prefs
) and concludes:
No it's not an ideal solution, but it should be done only once, unless you regularly change your formatter settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With