I'd recommend using an IDE like Eclipse or IntelliJ IDEA. They will do the compiling for you. Or use Ant, Gradle or Maven to compile. I am a professional Java developer and I cannot remember the last time I used javac
from the command line. There's no need for it.
If you insist on using javac
directly, either compile both files together from the appropriate source folder (the directory above "model").:
javac "model/InputDetails.java" "model/RelationDetails.java"
Or, if you want to compile them separately:
javac -classpath . "model/InputDetails.java"
javac -classpath . "model/RelationDetails.java"
The -classpath .
bit adds the current folder to the classpath for the javac
executable, so it can find the previously compiled class and you won't get the 'Symbol not found' errors.