Setting up PAs
Setting up Programming Assignments:
- Log into your lab computer.
- If you do not know your own CSE11 login id (cs11XXX), go to the ACMS lookup tool here: https://sdacs.ucsd.edu/~icc/index.php
- Even if you code on your own computer, you must ensure your code works on the lab computers.
- Also see these instructions for SSHing.
- Download the starter code from Vocareum or google drive (link will be provided in PA write-ups).
- To download the starter code as a zip file from Vocareum, start your assignment (either solo or with a partner). That should open the workbench, which looks like a simple in-browser IDE. In there, you will have the option to download the starter code as a zip file under the Actions drop down menu (see image below.)
- Create a new folder where you will put your PA work. Unzip all files into the folder.
- To edit the files using eclipse or vim follow these discussion slides.
- To compile the files, use terminal command javac. For example, javac File.java. If there is more than one file, just put them in like javac File1.java File2.java
- To run the files, use terminal command java. For example, java File . You can run only one main method at a time, and the file you run must contain a main method, so you cannot run more than one Java file.
Additional useful commands are:
- ls and ls -l (lists the files in current directory)
- mkdir (creates a new directory with the folder name in the current directory)
- cd (changes directory into the folder name from the current folder.)
- cp
- (copies the file or files to the specified directory)
- cp folderName/* . for example will copy all files in current directory/folderName into the current directory.
- The period means current directory and is sometimes useful to specify.
- scp (lets you transfer files between the server and your computer)
- time (for example, time java ThisProgram, times your program)