Development Set Up
Due Friday before class
Objectives
- to get you set up for future classwork
Part 0: Choose Your Text Editor
You'll use a text editor to start development in Java. (We'll switch it up later.) You will also use a text editor to write your commit messages in git (see below). The text editor you use for each task does not need to be the same.
Some options: emacs, vim, Atom (discontinued after Dec 15, 2022 :( ), nano, jEdit, Notepad, VSCode (but this adds a lot of bells and whistles that I don't want you to use yet). Play around and see what you like.
Part 1: Install and Set Up Git
- If you only plan to use the lab machines, you can skip this
step. On Mac or Linux, Git may already be installed. Follow the
instructions
here: Download
and install Git
On Windows, there are some settings you should set to work well with other platforms and it comes with a program called Git Shell that you can use to enter the commands below (you can also install a full version of Ubuntu Linux!) - Within your terminal/shell, configure Git for your computer
(note, these commands only need to be done once for each
computer you want to use git on)-- make sure to replace the information as appropriate
git config --global user.name "YOUR NAME" git config --global user.email "YOURUSERID@mail.wlu.edu"
I will use the terms terminal and shell interchangeably.
- When commiting, git automatically opens an editor to write/save the
commit messages. It seems that most systems are defaulting to
using
vim
for the editor, which many of you probably don't know and it has a learning curve. If you want to change the editor that is used for git, see these examples.
Creating Your GitHub Account
If you don't already, you should get a GitHub account.
Set up Your GItHub Account: Personal Access Token
Create a personal access token in the GitHub web interface.
- You can set the expiration to be the end of the term or to never expire.
- Set the scopes to all of
repo
. - Save your token somewhere! You can't get it again after it has been generated. You can create a new one, though.
Part 2: Installing Java's Development Kit
If you plan to work only on the lab machines, you can skip this step, but it's probably helpful if you have java installed on your machine.
We will be using the latest version of Java: 18. Specifically, I recommend that you get Liberica, a free, supported, 100% open-source OpenJDK. Make sure you get the JDK (which includes the JRE), not just the JRE.
On the command line, confirm that you're using Java 18 by running
java -version
javac -version
and seeing that the version is 18.
Submitting your assignment
No submission. This is just on your honor that you do it, so you're ready for future work.