compilation - Can't compile open-source java game -
i downloaded open source game https://github.com/sergedavid/advanced-wars-clone , want compile check out. however, still relatively new java , haven't made own program in sort of layout. cant seem find single file compile whole program , running.
i navigate "advanced-wars-clone-master\src\engine" in cmd, type "javac game.java" , hit enter. errors received below. thanks.
game.java:23: error: cannot find symbol public static map map; ^ symbol: class map location: class game game.java:24: error: cannot find symbol public static gui gui; ^ symbol: class gui location: class game game.java:25: error: cannot find symbol public static loadimages load; ^ symbol: class loadimages location: class game game.java:26: error: cannot find symbol public static inputhandler input; ^ symbol: class inputhandler location: class game game.java:27: error: cannot find symbol public static editor edit = new editor(); ^ symbol: class editor location: class game game.java:28: error: cannot find symbol public static battle btl = new battle(); ^ symbol: class battle location: class game game.java:29: error: cannot find symbol public static errorhandler error = new errorhandler(); ^ symbol: class errorhandler location: class game game.java:30: error: cannot find symbol public static pathfinding pathing = new pathfinding(); ^ symbol: class pathfinding location: class game game.java:31: error: cannot find symbol public static listdata list; ^ symbol: class listdata location: class game game.java:32: error: cannot find symbol public static save save = new save(); ^ symbol: class save location: class game game.java:33: error: cannot find symbol public static computerbrain brain = new computerbrain(); ^ symbol: class computerbrain location: class game game.java:34: error: cannot find symbol public static filefinder finder = new filefinder(); ^ symbol: class filefinder location: class game game.java:35: error: cannot find symbol public static viewpoint view = new viewpoint(); ^ symbol: class viewpoint location: class game game.java:49: error: package players not exist public static list<players.base> player = new arraylist<players.base>(); ^ game.java:50: error: package buildings not exist public static list<buildings.base> builds = new arraylist<buildings.base>(); ^ game.java:51: error: package units not exist public static list<units.base> units = new arraylist<units.base>(); ^ game.java:53: error: package players not exist public static list<players.base> displayc = new arraylist<players.base>(); ^ game.java:54: error: package buildings not exist public static list<buildings.base> displayb = new arraylist<buildings.base>(); ^ game.java:55: error: package units not exist public static list<units.base> displayu = new arraylist<units.base>(); ^ game.java:27: error: cannot find symbol public static editor edit = new editor(); ^ symbol: class editor location: class game game.java:28: error: cannot find symbol public static battle btl = new battle(); ^ symbol: class battle location: class game game.java:29: error: cannot find symbol public static errorhandler error = new errorhandler(); ^ symbol: class errorhandler location: class game game.java:30: error: cannot find symbol public static pathfinding pathing = new pathfinding(); ^ symbol: class pathfinding location: class game game.java:32: error: cannot find symbol public static save save = new save(); ^ symbol: class save location: class game game.java:33: error: cannot find symbol public static computerbrain brain = new computerbrain(); ^ symbol: class computerbrain location: class game game.java:34: error: cannot find symbol public static filefinder finder = new filefinder(); ^ symbol: class filefinder location: class game game.java:35: error: cannot find symbol public static viewpoint view = new viewpoint(); ^ symbol: class viewpoint location: class game game.java:49: error: package players not exist public static list<players.base> player = new arraylist<players.base>(); ^ game.java:50: error: package buildings not exist public static list<buildings.base> builds = new arraylist<buildings.base>(); ^ game.java:51: error: package units not exist public static list<units.base> units = new arraylist<units.base>(); ^ game.java:53: error: package players not exist public static list<players.base> displayc = new arraylist<players.base>(); ^ game.java:54: error: package buildings not exist public static list<buildings.base> displayb = new arraylist<buildings.base>(); ^ game.java:55: error: package units not exist public static list<units.base> displayu = new arraylist<units.base>(); ^ game.java:67: error: cannot find symbol gui = new gui(this); ^ symbol: class gui location: class game game.java:73: error: cannot find symbol load = new loadimages(); ^ symbol: class loadimages location: class game game.java:74: error: cannot find symbol map = new map(); ^ symbol: class map location: class game game.java:75: error: cannot find symbol input = new inputhandler(); ^ symbol: class inputhandler location: class game game.java:76: error: cannot find symbol list = new listdata(); ^ symbol: class listdata location: class game 38 errors
to compile project command line, need first compile classes on other classes depend.
for example, in of sub-packages, there base.java file. first compile file, , others.
at end, compile classes in engine sub-package.
if can't figure out file compile first, open using editor, , check classes uses. compile classes first.
however, recommend import project in , ide , compile it. of ides automatically compile required classes first.
Comments
Post a Comment