PhotoAlbumMain.java is the entry point of the program. The program accepts command-line arguments in the following format. Arguments delimited by [] are optional, depending on the command-line options:
-in "name-of-command-file" -view "type-of-view" [-out "where-output-should-go"] [xmax] [ymax]
-in: Specifies the name of the input file (mandatory).-viewor-v: Specifies the type of view (mandatory). Both-viewand-vare synonymous.- Possible values for the type of view:
"web"(HTML-based view)"graphical"(Swing-based view)
- Possible values for the type of view:
-out: Specifies the output file. This argument is only relevant for the HTML (web) view and is optional. Ignored for the graphical view.xmaxandymax: Optional integers specifying the bounds of the "view window." Default values are1000for both width (xmax) and height (ymax) if these arguments are not provided.
MyProgram -in buildings.txt -out myWeb.html -v web
- Input file:
buildings.txt - View type:
web - Output file:
myWeb.html
MyProgram -in buildings.txt -v graphical 800 800
- Input file:
buildings.txt - View type:
graphical - View window size:
800 x 800
Input file samples can be found in resources directory.
Open a command-prompt/terminal and navigate to 'resources' folder. Type the following and enter:
java -jar Assignment7.jar -in "name-of-command-file" -view "type-of-view" [-out "where-output-should-go"] [xmax] [ymax]