Why not give him a JAR file with the executable attribute set? That way all he has to do is double click it.

If your teacher wants the source code, tell your teacher you're doing what most java...