CS2030 AY19/20 Semester 2
  • Introduction
  • Textbook Contributions
  • Peer Learning Tasks
  • Piazza Participation
  • Setting Up Lab Environment
  • Setting Up Java
  • Setting Up Vim
  • Setting Up MacVim
  • Setting Up Sunfire and PE Nodes
  • Setting Up Checkstyle
  • Textbook
  • CS2030 Java Style Guide
  • CS2030 Javadoc Specification
  • JDK 11 Download Link
  • Codecrunch
  • Github Repo
  • Piazza Forum

  • Setting Up Lab Environment


    From this tutorial, you should be able to set-up a Unix-like environment to simulate the actual Command-Line Interface (CLI)
    you face in CS2030 during your lab sessions.

    This only applies to Windows Users.
    If you are a Mac User, you can use your terminal. But do remember to have jdk-11 installed!
    Mac Users have to use MacVim instead of gVim. You can refer to this link!
    1. Go to Settings.
    1. Go to Apps.
    1. Under Programs and Features, click the Turn Windows features on or off option.
    1. Tick the checkbox beside Windows Subsystem for Linux. It will prompt you to restart your computer.
    1. Congratulations! You have installed WSL for Your Windows Computer!
    As gVim is a Graphical User Interface (GUI) application, you would need someone else other than a Linux Subsystem to open gVim.
    This is when XMing comes in handy!
    1. Go to this link and download XMing Installer.
    1. Open the .exe file and follow the setup.
    1. To make sure the XMing server runs everytime you startup your computer, add a XMing,.exe shortcut to this directory:
      C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

    1. It should appear under your StartUp Apps.
    1. Do make sure to restart your computer after following this section.
    1. Go to this link and download the Ubuntu Installer! Once it has finished download, launch the application.
    1. Once you have launched the application, key in a new Unix username and password. Please remember this password as you would need this to download packages for installation later!
    1. You are now ready to install the jdk package onto your Ubuntu environment.
      To do so, type in sudo apt update, followed by sudo apt install openjdk-11-jdk-headless.
    1. As gVim is not installed on your Ubuntu environment, you would need to install it yourself.
      To do so, type in sudo apt install vim-gnome.

    2. Type in vim .bashrc and add the last line to your .bashrc file.

    1. Once done, exit the file and restart the Ubuntu application.

    2. Now, gVim should work whenever you use the gvim command.

    1. You can change your .vimrc file configurations to suit your needs.

    2. Below is a sample .vimrc file configration provided for you.

    filetype plugin indent on
    set lbr nu et ts=4 sw=4 ai si sc bs=2 wb nobk vb so=1 ru ls=2
    set ww=b,s,h,l,<,>,[,]
    set clipboard=autoselect,exclude:.*
    set fo+=r
    syn on
    1. To do so, type in vim .vimrc, change the configurations and save using :wq.

    If you follow all these instructions carefully, you should be able to access your files at this directory:
    C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home