Continue learning Java Java 2

Programming in Java II builds on Programming in Java I and develops students' skills in programming and using commonly used technologies from the Java ecosystem.

Course Organisation and Conditions of Graduation

Scored assignments on exercises - minimum 10 out of 25

Starting with the first exercise (week of 2/17 - 2/21/2025), exercises will be scored. Thus, the exercises will always require a problem to be solved, for which points will be assigned similarly to Java I. There are 13 weeks in the semester, the last one will have a credit test, one exercise will be dropped due to Easter and Sports Day, (Thursday's two exercises will be dropped due to a public holiday) and one exercise will have a practical knowledge test. So 9-10 exercises, each of them will be possible to get 3 points. Only 25 points can be recorded, but the higher number will solve any normal frequency of absences due to illness and will not have to deal with substitute exercises. In the event of prolonged sickness, everything will be dealt with on an individual basis.

Homework minimum 0 points out of 10

Each scored exercise corresponds to one homework assignment for which 1 point may be earned. The homework is for practice and cannot be accurately verified, so only a limited number of points are awarded.

Practical knowledge test with a minimum of 7 points out of 15

During the week of April 17 - 11, 2025, a practical knowledge test will be held, where you will create code according to the assignment (programming test) at the computer in the classroom.

Semester project 10-25

The semester project will be submitted in kelvin or edison (to be determined) and defended individually during the exam period, dates to be announced. Project topics will be the creation of a REST API server to store data from a game, or from a GUI created in other courses.

Credit Test 10-25

The credit test will take place in the last week of the semester and will test theoretical knowledge in the form of an electronic test in the LMS.

Semester project

Create a web application (back end in Java - Spring/Quarkus) with REST interface, front end in any web technology or JavaFX.

Use the project from last semester (game) and focus on data storage. Store the data using REST API (Swagger/Open Api generator can be used). It is also possible to use the project in other courses where the goal is to create a web application and serve the solution with the project to the Java2 course.

The application will use a database through JPA. A minimum of 3 entities with bindings between them will be used. At least one binding will be at least 1:N.

Required tools

  •     Java 21
  •     Maven 3.9.6 (3.9.x)
  •     SceneBuilder 23.0.x
  •     IDE - Eclipse 2024-06 or IntelliJ 2024.3.3 (required Ultimate for web development)

It is a good idea to keep to the versions to avoid problems.

 

Java 21

Java 21 - Can be dowloaded OpenJDK or on Oracle JDK

Instalation under Ubuntu

#Installation in command line
sudo apt update
sudo apt -y install openjdk-21-doc openjdk-21-jdk openjdk-21-jdk-headless openjdk-21-jre openjdk-21-jre-headless openjdk-21-source
#check success
java -version

Java installation under Windows

  1. Download the Oracle JDK installer
  2. Double click on the installer
  3. Next, Next, Next ...

Maven 3.9.6

Maven 3.9.6 - for download on  maven.

Maven installation for Ubuntu

sudo apt update
sudo apt install maven
#download and extraction most recent version
wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
tar -xvf apache-maven-3.9.9-bin.tar.gz
#on the end of file $HOME/.bashrc add:
PATH="$HOME/apache-maven-3.9.9/bin:$PATH"
#run new terminal window and chceck version of maven
mvn -version

Maven installation for Windows

  1. Download the package from the website
  2. Unzipping to the desired location
  3. Setting the path to run: Settings->About->Advanced System Settings->Environment Variables...
  4. For users, edit the Path variable and add a bin folder in the unzipped maven folder.
  5. Test in new console: mvn -version

SceneBuilder 23.0.x

Download here.

Installation using the installer. In windows doubleclick in Ubuntu for example:

sudo dpkg -i SceneBuilder-23.0.1.deb

Eclipse 2024-06

Eclipse - Download the installer here. When installing, select the option for "Java Developers". Or download the Eclipse for Java Developer package directly here.

Unzip the downloaded package and create icons in the system menu to run it. For windows, the installer is also available (Next, Next, Next)

Install the following plugins into eclipse from the Eclipse Marketplace:

In Window -> Preferences -> JavaFX set the path to SceneBuilder

Lombok 1.18.36

Download Lombok here. In the directory where you downloaded Lombok, run the command (in Windows, just double-click on the file):

  •     java -jar lombok.jar

Use the "Specify location ..." button. Select the eclipse location and use the "Install/Update" button to install Lombok support in Eclipse.

Creating a start menu icon for Eclipse in Ubuntu

#in folder $HOME/.local/share/applications create  file eclipse-2024-12.desktop
#With content:
[Desktop Entry]
Version=1.0
Name=2024-12 Eclipse Java
Comment=Eclipse 2024-12 My favorite development tool for my favorite language :-)
Exec=/path/to/my/eclipse/java-2024-12/eclipse/eclipse
Icon=/path/to/my/eclipse/java-2024-12/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Programming;Application;
Name[en_US]=Eclipse Java 2024-12

InteliJ IDEA

InteliJ IDEA can be downloaded here.

Install the plugins:

Video tutorial on installing all tools under Windows

Installing all tools under Windows

Video tutorial on installing all tools under Ubuntu

Installing all tools under Ubuntu