简体   繁体   English

如何为Visual Studio代码创建Java项目

[英]How to Create a Java Project for Visual Studio Code

I have just transitioned into Visual Studio Code from Eclipse for Java. 我刚从Eclipse for Java过渡到Visual Studio Code。 I want to create a simple HelloWorld folder which has src and bin folders. 我想创建一个简单的HelloWorld文件夹,其中包含src和bin文件夹。 However, I do not know how to create the .classpath, .project, and .settings the same way Eclipse does it. 但是,我不知道如何创建.classpath,.project和.settings,就像Eclipse一样。 How do I do this? 我该怎么做呢?

按Ctrl + Shift + P显示所有命令,然后键入“Java”并选择“Java:Create Java Project”

Visual Studio Code doesn´t have this orientation of creating a project because it´s file oriented. Visual Studio Code没有这种创建项目的方向,因为它是面向文件的。 It´s on of the diferences with Visual Studio. 它与Visual Studio有所不同。

It means that creating a project structure is based on folders and files, and no file references and links the folders and files to a project. 这意味着创建项目结构基于文件夹和文件,没有文件引用,并将文件夹和文件链接到项目。 If you want to create a project with src and bin folders, you´ve to do it manually. 如果要使用src和bin文件夹创建项目,则需要手动执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM