Skip to content

mathisi-io/java-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Fundamentals

Getting Started

Here is a guideline to help you get started to write Java code in Visual Studio Code.

Folder Structure

The workspace contains two folders by default, where:

  • src: the folder to maintain sources
  • lib: the folder to maintain dependencies
.
└───HelloWorld
    ├───.vscode
    ├───bin
    ├───lib
    └───src

Meanwhile, the compiled output files will be generated in the bin folder by default.

If you want to customize the folder structure, open .vscode/settings.json and update the related settings there.

We are going to create our source code in src folder.

Compilation

From your root solution folder (HelloWord), run the below command which will compile source code to bin folder

javac src/App.java -d bin

Run the program

# Switch to bin directory
cd bin
#Run java application .class
java App
# Output
Hello, World

Dependency Management

The JAVA PROJECTS view allows you to manage your dependencies. More details can be found here.

About

Java Fundamentals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages