Download the latest stable release (do not download a beta) from this link: WinSCP
Install and run. Click the New button to connect to a remote server.
Fill in the information to connect to ocelot.
Click the Login button to connect.
Once you are connected, you will see two file lists: the one on the left contains the files for the local machine; the one on the right contains the files for the remote machine.
At the bottom of the screen are links that perform common operations. The links include the function keys that do the same task.
Click in the right hand pane and press the F7 key to create a directory named cop2250.
Double-click the new directory to see that it is empty.
Right-click in the right hand pane and select New -> File. Give it the name FirstProgram.java and click OK. Enter the following code into the editor that opens.
public class FirstProgram { public static void main( String args[] ) { System.out.println( "Hello Java" ); } }
Save the file (Ctrl-S).
Select the menu options Commands -> Open Terminal (Ctrl-T)
Compile the file with the command: javac FirstProgram.java
If there are errors, then close the terminal and return to the editor. Fix the errors and compile the file again. Continue until you have no errors.
When there are no errors, you will see that the
FirstProgram.class
file has been created.
Once there are no errors, run the class with the java command: java
FirstProgram
Notice that you compile a file (javac FirstProgram.java), but you run a class (java FirstProgram).