Error Can not find or load the main class (Java)

import java.util.Scanner;

public class Twk {

    public static void main(String[] Twk) {

        System.out.println("Welcome to Twk");
        Scanner enterName = new Scanner(;
        String name =;



Why does it happen? and Twk.class are at the same place. Need some helps, thanks.

Error: Could not find or load main class Twk

Try with java -cp . Twk, this will probably let the java command "sees" the Twk.class file