Home CPSC 240

Lab 0: Cloud VM Setup

 

Objective

To set up a virtual machine (VM) on Google cloud. This will allow you to have a command-line machine for doing the labs and projects for this course.


 

Details

The instructions for setting up your Google Cloud account, and creating a virtual machine, are on the CPSC 225 page. You can find the instructions here:

http://ianfinlayson.net/class/cpsc225/notes/01-intro#google-cloud

Follow the linked instructions through the "Connecting with a Client" section.


 

Installing Java

You should now have a Google Cloud VM up and running. The next step is to install the Java software development kit. In order to do this, you will need to run some commands (the $ is part of the shell prompt, don't copy that). Start by making sure your system is up to date:

$ sudo apt update
$ sudo apt upgrade

Enter 'Y' when it asks if you are sure.

Next install the Java development kit:

$ sudo apt install openjdk-11-jdk

This may take a while to complete. When it's done, you should have Java up and running. In order to test it, run the "javac -version" and "java -version" commands. If everything went well, you should see this:

$ javac -version
javac 11.0.11
$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2, mixed mode, sharing)

If you see this, then you should be good to go!

Copyright © 2021 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.