'Netbeans can't find main class (Google Guava is being used)

I'm having a problem with Netbeans IDE 13 and Google Guava, the error says it can't find the main class, but not sure why?

Code Part:

package TinyBookGoogleGuava;

import java.util.Collection;

import com.google.common.collect.ArrayListMultimap;

import com.google.common.collect.Multimap;

public class TinyBookGoogleGuava {
    
    public static void main(String[] args) {
        
        Multimap<String, String> tinyBook = ArrayListMultimap.create();

        // Adding some key/value
        System.out.println("\nAdding----------------------------------------");
        tinyBook.put("book", "A set of pages.");
        tinyBook.put("book", "To arrange something on a particular date.");
        tinyBook.put("bookable", "Can be ordered.");
        tinyBook.put("bookbinder", "A person who fastens the pages of books.");
        tinyBook.put("bookcase", "A piece of furniture with shelves.");

        // Getting the size
        System.out.println("\nSize------------------------------------------");
        System.out.println(tinyBook.size());  // 5

        // Getting values
        System.out.println("\nValues----------------------------------------");
        Collection<String> book = tinyBook.get("book");
        System.out.println(book);
        // [A set of pages., To arrange something on a particular date.]

        Collection<String> bookcase = tinyBook.get("bookcase");
        System.out.println(bookcase);
        // [A piece of furniture with shelves.]

        // Iterating over entire Mutlimap
        System.out.println("\nIterate---------------------------------------");
        tinyBook.values().forEach((value) -> {
            System.out.println(value);
        });

        // Getting hash codes
        System.out.println("\nHash Codes-------------------------------------");
        tinyBook.entries().forEach((entry) -> {
            System.out.println(entry.hashCode() + "\t"
                    + System.identityHashCode(entry));
        });

        System.out.println("\nHash Code--------------------------------------");
        System.out.print(tinyBook.hashCode() + "\t");
        System.out.println(System.identityHashCode(tinyBook));

        // Removing a single value
        System.out.println("\nRemove----------------------------------------");
        tinyBook.remove("bookcase", "A piece of furniture with shelves.");
        System.out.println(tinyBook.get("bookcase")); // []

        // Remove all values for a key
        System.out.println("\nRemove All------------------------------------");
        tinyBook.removeAll("book");
        System.out.println(tinyBook.get("book")); // [] 
    }
    
}

Output:

run:

Error: Could not find or load main class TinyBookGoogleGuava.TinyBookGoogleGuava Caused by: java.lang.ClassNotFoundException: TinyBookGoogleGuava.TinyBookGoogleGuava C:\Users\luist\AppData\Local\NetBeans\Cache\13\executor-snippets\run.xml:111: The following error occurred while executing this line: C:\Users\luist\AppData\Local\NetBeans\Cache\13\executor-snippets\run.xml:68: Java returned: 1 BUILD FAILED (total time: 0 seconds)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source