I am new to java and I am currently trying to run a program for a class assignment and it compiles however, every time I run it I get this error "Error: Could not find or load main class sailboat.java" To make things worse I need to submit this in a different way from standard assignments logging onto the main server of my campus and transfer it from my directory to another yet every time I do it, it tells me it can't open the source file.
Would these two situations because by the same thing? Is this something caused by a mistake in my code, or is it something wrong with my Classpath?
here's the code I made, I used notepad++
import java.text.*;
import java.io.*;
import java.math.*;
public class sailboat {
public static void main (String argv []) throws IOException {
BufferedReader stdin =
new BufferedReader (new InputStreamReader (System.in));
String inputValue;
//Tartan 34C Title
System.out.println("Sailboat: Tartan 34C");
//Tartan 34C inputs
double LOA = Double.parseDouble("34.50");
double LWL = Double.parseDouble("24.00");
double beam = Double.parseDouble("10.20");
double displace = Double.parseDouble("11200.00");
double displace_Ton = Double.parseDouble("5.60");
double sail_Area = Double.parseDouble("483.00");
//Hull Speed Formula
double hull_Speed = Math.sqrt(LWL) * 1.34;
System.out.println("Hull Speed:" + hull_Speed);
//Displacement to Waterline Length Formula
double displace_Lng = displace_Ton / 0.01 * Math.pow(LWL, 3.0);
System.out.println("Displacement to water lenght:" + displace_Lng);
//Sail Area to Displacement Formula
double sail_Area_Displace = sail_Area / Math.pow((displace / 64), 0.67);
System.out.println("Sail Area to displacement:" + sail_Area_Displace);
//Capsize Screening Index Formula
double Cap_I = beam / Math.pow((displace / 64), 0.33);
System.out.println("Capsize Screening Index:" + Cap_I);
//Comfort Index Formula
double Comf_I = displace / (0.7 * LWL + 0.3 * LOA) * 0.65 * Math.pow(beam, 1.33);
System.out.println("Comfort Index:" + Comf_I + "\n");
any input would be helpful.