The getClass().getResourceAsStream
will find a resource base on the classpath.
So you must sure that the file you want to open is in the class path. As I see you are trying to find the file in the src/kan/master_ship.txt
which is not in the class path. try /kan/master_ship.txt
and make sure you have the kan
folder and a master_ship.txt
file in it and the folder is in the class path.
In the eclipse the class path is usually named target.