Skip to content

ClassNotFoundException when trying to run the SBK help command on Git Bash #335

@sushnag22

Description

@sushnag22

Describe the Issue (Bug/Feature)

Bug: When the help command ./build/install/sbk/bin/sbk -help is executed in Git Bash in the root directory of this project, an error due to main class caused by ClassNotFoundException occurs.

To Reproduce

Steps to reproduce the behavior:

  1. Open Git Bash and clone this repository using the command git clone https://github.com/kmgowda/SBK.git and move into the root direcctory using the command cd SBK.
  2. Use the command ./gradlew build (ensure that JDK 17+ and Gradle 7+ is previously installed) to build the project.
  3. Extract the compressed tar file using the command tar -xvf ./build/distributions/sbk.tar -C ./build/distributions/.
  4. Ensure that the test cases pass using the command ./gradlew check(optional step).
  5. Get the binary files of the project using the command ./gradlew installDist.
  6. Now after all these steps, use the command ./build/distributions/sbk/bin/sbk -help to run the SBK project to get the usage details.
  7. See the error related to main class caused by ClassNotFoundException.

Expected behavior

The expected behavior is that the SBK project must run and display the usage details of SBK command.

Additional context

  1. The error says:
    Error: Could not find or load main class io.sbk.main.SbkMain
    Caused by: java.lang.ClassNotFoundException: io.sbk.main.SbkMain

Screenshot
2. The version of git I'm using is "git version 2.35.1.windows.2"

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions