Skip to content

Latest commit

Β 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Java3rd_basic_course

Java 1st Labwork

This repository contains lab works for the Java programming course. Each lab is organized in a separate folder, including source code, tests, and Maven configuration files.

Running Lab Works with Maven

Each lab work in the repository has its own structure and can be run using Maven. Below are instructions for running a lab work.

Requirements

  • Java JDK 1.8 or newer
  • Maven 3.x

Running a Lab Work

  1. Clone the repository:

    git clone (https://github.com/Uliana200407/Java3rd_basic_course.git)
    cd src
    
  2. Navigate to the specific lab work

For example, to run the first lab work:

cd JavaLg1
  1. Run the project using Maven
mvn clean install
mvn exec:java -Dexec.mainClass="org.example.MatrixLab"
  1. Running Tests
mvn test

Java 2nd Labwork

Step 1: Navigate to the Project Directory

cd ~/Desktop/Java\ Language\ Labs/JavaLg2

Step 2: Compile the Java Code

javac -d out -cp src/main/java src/main/java/org/example/*.java src/test/java/org/example/*.java

Step 3: Run the Main Class

java -cp out org.example.LabWork2

Step 4: Run the JUnit Tests

java -jar junit-platform-console-standalone.jar -cp out --select-class org.example.LabWork2Test

Step 5: Run the tests with Maven

mvn test

Java 3rd Labwork

Step 1: Navigate to the Project Directory

cd ~/Desktop/Java\ Language\ Labs/JavaLg3

Step 2: Compile the Java Code

javac -d out -cp src/main/java src/main/java/org/example/*.java src/test/java/org/example/*.java

Step 3: Run the Main Class

javac -d out -cp src/main/java src/main/java/org/example/*.java src/test/java/org/example/*.java

Step 4: Run the JUnit Tests

java -jar junit-platform-console-standalone.jar -cp out --select-class org.example.CarTest

Step 5: Run the tests with Maven

mvn test

Java 4th Labwork

Step 1: Clone the Repository

git clone <repository-url>
cd <repository-name>

Step 2: Compile the Code

cd src/main/java
javac org/example/*.java

Step 3: Run the Application

java org.example.LabWork2Executor

Step 4: Run Unit Tests (Optional)

# Navigate back to the root directory (if necessary)
cd ../../../..

Step 5: Run the tests with Maven

mvn test

Java 5th Labwork

Step 1: Navigate to Your Project Folder

cd path/to/your/project/src

Step 2: Create the Package Structure in src Folder

mkdir -p org/example

Step 3: Compile the Program

javac org/example/*.java

Step 4: Run the Program

java org.example.CandyGiftApp

Step 5: Run the tests with Maven

mvn test

Java 6th Labwork

Step 1: Navigate to Your Project Folder

cd /path/to/your/project

Step 2: Compile the project:

mvn compile

Step 3: Compile the test classes

mvn test-compile

Step 4: Run the tests with Maven

mvn test

About

This repository was created for studying aimsπŸ‘©πŸ»β€πŸŽ“

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages