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). First add a repository containing the official versions of Java:

$ sudo add-apt-repository ppa:linuxuprising/java

Then hit Enter when it asks you to. Next, run this command to update your system's package list:

$ sudo apt update

Then finally, run this command to install Java:

$ sudo apt install oracle-java12-installer

This will 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 12.0.2
$ java -version
java version "12.0.2" 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

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

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