I installed java on my MacBook, I'm trying to start a simple hand that is in a jar but I just can't.
The command I launch is the following:
java -cp sell.jar it.test.testina
The error is always this:
error: Cannot Find or Load the Main Class it.test.testina Launching the same command on Windows everything works correctly
java version "1.8.0.351".
I guess the problem is that I am not setting the classpath.
Thank you in advance for the helps.
I tried to set java_home
in bash_profile
but it does not work.
Below is my code in my class:
import java.text.DecimalFormat;
public class testina {
public static void main(String[] args) {
DecimalFormat decimalFormat = new DecimalFormat("#,00");
double dprice= Double.parseDouble( decimalFormat.format(4.551d));
System.out.println(dprice);
}
}
In this link I can see output of the command jar tf sell.jar