First post here. I tried searching for a resolution to my problem but could not find anything suitable. If I missed the proper solution, please point me in the right direction and I apologize!
I recently took up Java as a second programming language to complement my major, and have been diving head first into OOO. I am attempting to compile the guessing game program from head first java, but get an error that the flag is invalid.
I am running Ubuntu 10.04, and compile/run everything using the terminal. I navigated correctly to the containing folder (everything else has compiled correctly so far).
The program is a guessing game containing 3 separate class files. One contains the dialog and results for the guessing game, one contains the player class, and one launches the game. According to the tutorial, I am to compile and run the gameLauncher.class file. In the terminal I typed javac gameLauncher.class and am given the following error:
javac: invalid flag: gameLauncher.class
Usage: javac<options><source files>
use -help for a list of possible options
I have attempted different ways of running this, including leaving out the .class part of the filename, running the class file without compiling first, etc. with no resolution. I know it's probably an easy solution that I am just not recognizing, but I am pretty new to all this. Thanks for any pointers!