The javac
compiler reads *.java
source files and generates *.class
files. As I see it, since DVDs/CDs are write-once, you'll need to adopt one of the following approaches:
- You compile the Java and burn both the source and class files onto the disk.
- You put the Java source onto the disk, and then your lecturer uses something like
javac -d path/to/output/directory
to generate the compiled class files somewhere on their own computer, and running the program from there.