Reputation: 63
I have just transitioned into Visual Studio Code from Eclipse for Java. I want to create a simple HelloWorld folder which has src and bin folders. However, I do not know how to create the .classpath, .project, and .settings the same way Eclipse does it. How do I do this?
Upvotes: 6
Views: 13320
Reputation: 416
First you need install some packages for Visual Studio Code. You can find all in this Microsoft Support page: https://code.visualstudio.com/docs/java/java-tutorial
After you have installing it, you can press CTRL+SHIFT+P
and type Java
for get all commands.
In your case, for make a new project, follow these tips:
CTRL+SHIFT+P
to open Command menuJava: Create Java Project
No build tools
My first program
Yes, I trust the authors
Now your project is created. You can see the folder src
with the file App.java
and the Hello World's code inside.
Now for testing your first program, press the right mouse button on App.java
file and select Run Java
Now, if all works, your Hello World's program is printed on your Terminal window.
Upvotes: 0
Reputation: 91
Hit Ctrl+Shift+P to show all commands, then type "Java" and select "Java: Create Java Project"
Upvotes: 9
Reputation: 304
Visual Studio Code doesn´t have this orientation of creating a project because it´s file oriented. It´s on of the diferences with 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.
Upvotes: 1