Skip to content

bigbasti/JavaTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JavaTest

A simple Java Maven project that displays "Hello World" on the console.

Prerequisites

  • Java 17 or higher
  • Maven 3.6 or higher

Project Structure

JavaTest/
├── README.md
├── pom.xml                         # Maven configuration
├── src/
│   ├── main/
│   │   └── java/
│   │       └── com/
│   │           └── example/
│   │               └── HelloWorld.java    # Main application
│   └── test/
│       └── java/
│           └── com/
│               └── example/
│                   └── HelloWorldTest.java # Unit tests
└── .gitignore                      # Git ignore file for Maven projects

How to Run

Using Maven (recommended)

# Compile the project
mvn compile

# Run tests
mvn test

# Run the application
mvn exec:java -Dexec.mainClass="com.example.HelloWorld"

# Build JAR file
mvn package

Using Java directly

# Compile first
mvn compile

# Run with Java
java -cp target/classes com.example.HelloWorld

Expected Output

Hello World

Maven Goals

  • mvn clean - Clean build artifacts
  • mvn compile - Compile the source code
  • mvn test - Run unit tests
  • mvn package - Create JAR file
  • mvn exec:java - Run the main class

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages