1. Java workstation setup
Main Steps
- About the course
- Install the operating system
- Install additional packages
- Set up user data
- Optional tasks
About the course
Install the operating system
- If you are not sure about the drivers for your WiFi devices, use an Ethernet (cable) network.
- For a real, physical computer, insert the installation USB drive into the computer and restart it.
- Press Esc or one of the F9..F10 keys (look it up for your specific hardware if necessary) to activate the boot device menu.
Select USB flash drive as boot device. Depending on the boot manager, it may look different, for example (see pictures if necessary)
- Then select Install Xubuntu
- To set Xubuntu as the only operating system, select the option: Erase disk and install Xubuntu
- Set up a Xubuntu Linux workstation with the following settings:
- Location: Riga
- User: your identifier
- Password: strong password
- Computer name — the first syllables of your first and last name, separated by a dash, for example val-vit
- Language English or latvian
- Complete the setup wizard and log in to your computer
Set up your operating system
- Connect your computer to your router or switch using an Ethernet cable
- If necessary, familiarize yourself with terminal and ways to copy, paste, and execute commands
- Set the IP address of cserver:
- Open a terminal
type: sudo mousepad /etc/hosts and add lines to the file that look like this:
127.0.0.1 localhost
127.0.1.1 val-vit
3.123.45.45 cserverwhere val-vit is your computer and cserver is the server name provided by your instructor.
check if the command ping cserver returns response times
check if /etc/hostname has the same name, e.g. val-vit as /etc/hosts, e.g. val-vit
- Check that additional software repositories are enabled:
open a terminal and enter the command:
sudo su
cat /etc/apt/sources.list.d/ubuntu.sourcescheck that it contains lines Components: main restricted universe multiverse
Refresh repository metadata, update system, and clean up unnecessary packages with the command in the terminal:
sudo apt update; sudo apt full-upgrade; sudo apt autoremovepress enter key to confirm actions (and similarly for further tasks)
- Restart your computer.
Install additional packages
Install the JDK and Maven tools with the command (and implicitly the Java development environment as a Maven dependency):
sudo apt-get install default-jdk mavenDownload the Eclipse archive file from https://www.eclipse.org/downloads/packages/
or
download IntelliJ IDEA from https://www.jetbrains.com/idea/download/
- Create a folder IDEs in your home folder
- Unzip the archive to the IDEs folder.
Check if the command java -version returns information about Java
Check if the command mvn -version returns information about Maven
- For more information, see:
- If you are having problems with your WiFi network, see Bezvadu tīkls.
Install the git command line and meld comparision tool:
sudo apt-get install git meld- Reboot your computer.
Set up user data
Set up user data Git:
git config --global user.name "FirstName LastName"
git config --global user.email firstname.lastname@example.comSet the default git editor for taking notes, etc., for example:
git config --global core.editor mousepadSet meld as git's default merge and change review tool:
git config --global merge.tool meld
git config --global diff.tool meld
Optional tasks
Remove unnecessary packages
Remove the update manager so you don't get annoyed by update notifications1:
sudo apt-get purge update-manager
Install better VirtualBox drivers
To enable copy and paste between the host system and the virtual machine, additional drivers must be installed in the virtual machine.
In the terminal, run the command:
sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)- Select the menu Devices — Insert Guest Additions CD image...
- Open the terminal directly in the virtual CD drive folder (for example, open it in the file manager and press F4)
Run the command
sudo ./autorun.shand wait for the installer to finish and press Enter
- Reboot the virtual machine.
- In the VirtualBox window, select the menu Devices — Shared Clipboard — Bidirectional
- ^ This will also remove the ubuntu-release-upgrader-gtk* update-manager* update-notifier* xubuntu-desktop* metapackages (packages that contain packages), but the actual packages will remain installed.