% cd # make sure you are in your home directory % ls # list the contents of your home directory cs21/ # should be a single directory that we created last time % cd cs21 # change directories to cs21 % pwd # check that you are in your /home/username/cs21 sub directory % mkdir week1 # make a new directory named week1 in your cs21 directory % cd week1 % pwd # check that you are in your /home/username/cs21/week1 sub directory
Now copy over all the files from my public/cs21/week1 directory into your week1 directory (remember to add the dot as the destination of the cp command):
% cp ~newhall/public/cs21/week1/* . % ls
% vim MyFirstClass.javaTo compile and run the MyFirstClass program:
% javac MyFirstClass.java # compile Java source code to bytecode # creates MyFirstClass.class file % ls MyFirstClass.class MyFirstClass.java % java MyFirstClass # run the class on the java virtual machine