Please excuse the confusion, I have searched for this topic on Stack Overflow but do not fully understand the answers. I am green. I am using Eclipse to create my first Java program, it compiles and runs successfully.
package com.java24hours;
class Saluton {
public static void main (String[] arguments) {
//My First Java program goes here
String greeting = "Saluton mondo!";
System.out.println(greeting);
}
}
So I am trying to run This in terminal on my Mac. The file path I have is /Users/admin/documents/java/java24/com/java24hours
I try to run in the java24hours directory "Java Saluton.java" and return with a "Error: Could not find or load main class Saluton.java"
It is my understanding that this has to do with the package. I have researched package names but do not understand how the fully qualified name works with classes and packages.
While this compiles in the IDE, I would like to make it compile in terminal and understand why it did not compile the way I wanted it to.
Thank you for your patience.