0

I'm a beginner, when I create a java project using the command pallate in vscode ctrl-shift-p -> java: Creat java project, only created the lib, src and readme files, I see on the vscode website there must be a .settings, bin, src folder .classpath .project

is there anything to configure again? thank you

my create project

create project on vscode web

4
  • Those files are hidden, by default. If you look on the file system, you see they are there. Commented May 21, 2020 at 20:54
  • Hey, if you're new to java I would really recommend starting out by writing your code in something such as notepad and compiling via the command line. This way you'll get a much better understanding of how to write code and the process of compiling it. A quick guide for creating a simple program and compiling via command line: instructables.com/id/… Commented May 21, 2020 at 21:03
  • @Bradley I disagree. Having to compile your project and working without an IDE can make programming tedious and can demotivate people from coding. If you just want to code as a hobby, I recommend using IDEs. Of course, if you want to code as a job in the future, there could be some benefits from doing it your way, but that removes all of the fun. And why would you want to work something that's not fun? Commented May 21, 2020 at 22:48
  • If your a hobbyist yes go for the IDE. I found it really rewarding when something I wrote within notepad compiled successfully! Commented May 21, 2020 at 22:56

2 Answers 2

1

Those files you mention (.settings, .classpath, .project) are just metadata files from the IDE, and java does nothing with them, they are not part of a java project, the only thing you need to create a java program its a .java file. If you want to create a project, there are better ways, for example using maven https://maven.apache.org once you installed it, you can create a new project using the QuickStart archetype

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4

It will create a standard structure for your project, and will save you a lot of work with the structure of your project, dependencies and build configurations.

Sign up to request clarification or add additional context in comments.

Comments

0

To store project metadata some IDEs use additional files:

  • Eclipse uses .settings, .project, .classpath
  • Intellij uses .idea, .iml, .ipr, .iws

You don't need any of these for your project to work. If you use VSCode you don't need them at all.

Most modern java frameworks have quite comprehensive code generators for new projects which makes it easier to get started e.g.:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.