I'm working on an assignment and having trouble generating a javadoc html file for this class I've made. I've clicked Project > Generate Java Doc > Javadoc command auto filled to C:\Users\Evanl\workspace\CSC - Car Class\bin\Main\Car.class > click Next > name the document "Car javadoc" > click FInish and get error Error 193
Any ideas on how to fix this?
Main that runs my program:
package Main;
public class CarMain {
public static void main(String[] args) {
Car car1 = new Car("Honda", "Civic", "Black", 2020);
System.out.println(car1.toString() +"\n"+car1.ageOfCar()+"\n");
// TODO (Optional)
// Create another Car object named car2 and input your own values :)
// And then output its values like I did in line 5
// This is completely optional
Car myCar = new Car("Jeep", "Wrangler", "Black", 2023);
System.out.println(myCar.toString() +"\n"+myCar.ageOfCar()+"\n");
}
}
Car class:
package Main;
/**
* @author Evan Cammack
* @version 1.0
* created on 2/15/2023
* this is a template for a software car object
*/
import java.util.Calendar;
public class Car {
//private fields
private String make;
private String model;
private String color;
private int year;
private double mileage;
//default constructor sets all fields to default blank values
public Car(){
make = "";
model = "";
color = "";
year = 0;
mileage = 0;
}
//custom constructor
//"this" refers to current object
/**
* @param make String parameter representing make of car
* @param model String parameter representing model of car
* @param color String parameter representing color of car
* @param year int parameter representing year of car
* @throws IllegalArgumentException if year equals "0000"
*/
public Car(String make, String model, String color, int year){
this.make = make;
this.model = model;
this.color = color;
if (year <= 0000)
throw new IllegalArgumentException();
this.year = year;
mileage = 0;
}
//getters
/**
* @return make - the make of the car
*/
public String getMake(){
return this.make;
}
/**
* @return model - the model of the car
*/
public String getModel(){
return this.model;
}
/**
* @return color - the color of the car
*/
public String getColor(){
return this.color;
}
/**
* @return year - the year of the car
*/
public int getYear(){
return this.year;
}
//setters
/**
* @param make changes to the make of the car to given input String
*/
public void setMake(String make){
this.make = make;
}
/**
* @param make changes to the model of the car to given input String
*/
public void setModel(String model){
this.model = model;
}
/**
* @param make changes to the color of the car to given input String
*/
public void setColor(String color){
this.color = color;
}
/**
* @param make changes to the year of the car to given input String
*/
public void setYear(int year){
this.year = year;
}
/**
* @return ageOfCar - how old the car is
*/
public String ageOfCar() {
Calendar cal = Calendar.getInstance();
int ageOfCar = cal.get(Calendar.YEAR) - this.year;
return "This car is "+ageOfCar+" years old.";
}
/**
* @return make, model, color, year - returns make, model, color, and year in a string
*/
public String toString() {
return "Make: " +this.make+" Model: "+this.model+" Color: "+this.color+" Year: "+this.year;
}
}
I've tried googling and youtubing this specific error message but there's no guides to help fix it.