CS 201: Introduction to Computer Science

Working on your own computer

Among those students who own their own computers, many prefer to set up their computers with the software required for doing CS201 work. Doing this setup is an idiosyncratic business, so it's hard to give explicit step-by-step guidance that works for everyone. The CS Department tries to provide some pointers on setting up your own computer, but doesn't guarantee that we can help you make everything work. If you can't get things working on your own machine, you can always use the labs with a suitable setup (CMC 102, 304, 306, and Weitz 138).

That said, here are a few notes that might help.

First, here's what you will need:

How to install this software depends mostly on your computer's operating system. Here's a little guidance on the Unix and Java 8 installations. The text editor should be straight-forward to install, so I'll leave you on your own for that.

Windows 10

On Windows 10, you can install the Windows Subsystem for Linux to get a Unix command shell (bash). Once you have it set up, it usually works great, but it can be a bit of a tricky installation process.

I've searched around for helpful guides, and this installation guide at How-To Geek looks quite good.

Once you have the Windows Subsystem for Linux working and you have opened a bash prompt, try executing

javac -version

If that shows you "javac 1.8" or "javac 1.8.0_192" or something along those lines , great! You're ready to go. But if it tells you "command not found" or "permission denied" or something like that, then you need to install java, like so:

sudo apt-get update sudo apt-get install default-jdk

This will ask you to type your password, but should then let you run javac and java after it's done installing.

IMPORTANT: If you use the Windows Subsystem for Linux, I strongly recommend the following work procedure.

Why do this /mnt/c thing? Because the way the Linux Subsystem is implemented, you can't use normal Windows GUI applications on files stored in the Linux directory tree. If you do (e.g. editing /usr/home/Hello.java using Notepad or Atom), the Linux system gets messed up, which leads to erratic behavior and a need to reinstall the subsystem from scratch.

Getting all this set up on Windows is just harder than it is on macOS or Linux, but on the other hand, you're likely to learn lots of miscellaneous stuff about your computer while you do the setup. Learning to configure your own software development environment is undeniably a headache, but it is also empowering. Be persistent and ask for help.

macOS

macOS is based on one of the main variants of Unix, and Macs come with the Terminal app pre-installed. So for the Unix part of your installation, you're set up without doing anything. And on most Macs, you should already have javac and java version 8. Try executing

javac -version

in Terminal to check.

If your Mac does not have javac installed, I strongly urge you to use Homebrew. Follow the "Install Homebrew" instructions on their homepage, and then, in Terminal, do this:

brew tap caskroom/versions brew cask install java8

Test the result by with "javac -version"

Linux

All distributions of Linux come with a terminal program that is usually featured pretty much front and center (maybe with a Desktop shortcut, for example). They'll typically have Java 8 installed, but if "javac -version" doesn't give you "javac 1.8.something", then try this:

apt-get install java8