How to Compile Quick Reference

This assignment is designed to give you practice compiling and running a Java program. Start by saving the following file to your CompSci folder.

(You can save the file by right-clicking and choosing "Save Target As..." from the context menu.)

Then open up PowerShell.

Compile the program with the "javac" utility and then run the bytecode file through the "java" interpreter to execute it, as shown below.

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS U:\>cd "My Documents"
PS U:\My Documents>cd CompSci2
PS U:\My Documents\CompSci2>javac SineWave.java
PS U:\My Documents\CompSci2>java SineWave
PS U:\My Documents\CompSci2>

If you need to back up one folder, use cd ..

PS U:\My Documents\CompSci2>cd ..
PS U:\My Documents>



©2013 Graham Mitchell

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Creative Commons License