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.
Downloads
- squirrel-sql-4.7.1.zip (ZIP, 49484 KB, Oct 18, 2024)
- squirrel-sql-4.7.1.tar.gz (GZ, 49252 KB, Oct 18, 2024)
- java-2.pdf (PDF, 4159 KB, Oct 18, 2024)
- java-2.odp (ODP, 7229 KB, Oct 18, 2024)
- example-rest-api-server-client-with-FX.zip (ZIP, 72 KB, Oct 18, 2024)
- example-rest-api-client-server.zip (ZIP, 49 KB, Oct 18, 2024)
Points and credit
- A maximum of 10 points can be earned for homework during the semester. They will be handed in at the practicum or in another form as instructed by the instructor.
- In the last week of March, a practical test of knowledge (programming a problem directly in the classroom) will be given for a maximum of 24 points.
- The semester project will be submitted in the credit week for a maximum of 40 points.
- A credit test will be given in the classroom in the LMS for a maximum of 26 points.
Semestral project
Create a web application (back end in Java - Quarkus/Spring) with REST interface, front end in any web technology or JavaFX.
The application will use a database via JPA. At least 3 entities will be used with bindings between them. At least one binding will be at least 1:N.
The theme of the project is arbitrary.
Required tools
- Java 21
- Maven 3.9.6 (3.9.x)
- SceneBuilder 21.0.0
- IDE - Eclipse 2023-12 or IntelliJ 2023.3.4
It is a good idea to follow the versions to avoid problems. We are using the latest version of java and it requires the latest tools.
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
- Download the Oracle JDK installer
- Double click on the installer
- 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.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar -xvf apache-maven-3.9.6-bin.tar.gz
#on the end of file $HOME/.bashrc add:
PATH="$HOME/apache-maven-3.9.6/bin:$PATH"
#run new terminal window and chceck version of maven
mvn -version
Maven installation for Windows
- Download the package from the website
- Unzipping to the desired location
- Setting the path to run: Settings->About->Advanced System Settings->Environment Variables...
- For users, edit the Path variable and add a bin folder in the unzipped maven folder.
- Test in new console: mvn -version
SceneBuilder 21.0.0
Download here.
Installation using the installer. In windows doubleclick in Ubuntu for example:
sudo dpkg -i SceneBuilder-21.0.0.deb
Eclipse 2023-12
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:
- e(fx)clipse - https://marketplace.eclipse.org/content/efxclipse
- Edhanced Class Decompiler - https://marketplace.eclipse.org/content/enhanced-class-decompiler
- SonarLint - https://marketplace.eclipse.org/content/sonarlint
- Optional WindowBuilder - https://marketplace.eclipse.org/content/windowbuilder
In Window -> Preferences -> JavaFX set the path to SceneBuilder
Lombok 1.18.30
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-2023-12.desktop
#With content:
[Desktop Entry]
Version=1.0
Name=2023-12 Eclipse Java
Comment=Eclipse 2023-12 My favourite development tool for my favourite language :-)
Exec=/path/to/my/eclipse/java-2023-12/eclipse/eclipse
Icon=/path/to/my/eclipse/java-2023-12/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Programming;Application;
Name[en_US]=Eclipse Java 2023-12