-
Notifications
You must be signed in to change notification settings - Fork 0
/
java-serverlet-entwickeln-mit-vscode.html
145 lines (136 loc) · 25 KB
/
java-serverlet-entwickeln-mit-vscode.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html><html lang="de-ch"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Java Serverlet mit Tomcat und Maven in VSCode - Finecloud</title><meta name="description" content="In diesem Artikel ist beschrieben, wie man Apache Tomcat direkt in VSCode nutzen kann. Voraussetzung ist, dass du auf deinem Gerät bereits eine Java JRE und Apache Maven installiert hast. Weiter brauchen wir in VSCode das Extension Pack for Java, du kannst dire in VSCode…"><meta name="generator" content="Publii Open-Source CMS for Static Site"><link rel="stylesheet" href="https://www.finecloud.ch/media/plugins/syntaxHighlighter/prism-black.css"><link rel="canonical" href="https://www.finecloud.ch/java-serverlet-entwickeln-mit-vscode.html"><link rel="alternate" type="application/atom+xml" href="https://www.finecloud.ch/feed.xml"><link rel="alternate" type="application/json" href="https://www.finecloud.ch/feed.json"><meta property="og:title" content="Java Serverlet mit Tomcat und Maven in VSCode"><meta property="og:site_name" content="Finecloud"><meta property="og:description" content="In diesem Artikel ist beschrieben, wie man Apache Tomcat direkt in VSCode nutzen kann. Voraussetzung ist, dass du auf deinem Gerät bereits eine Java JRE und Apache Maven installiert hast. Weiter brauchen wir in VSCode das Extension Pack for Java, du kannst dire in VSCode…"><meta property="og:url" content="https://www.finecloud.ch/java-serverlet-entwickeln-mit-vscode.html"><meta property="og:type" content="article"><link rel="shortcut icon" href="https://www.finecloud.ch/media/website/finecloud.png" type="image/png"><link rel="stylesheet" href="https://www.finecloud.ch/assets/css/style.css?v=39da73365516a098a9b73b721fc970e2"><script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://www.finecloud.ch/java-serverlet-entwickeln-mit-vscode.html"},"headline":"Java Serverlet mit Tomcat und Maven in VSCode","datePublished":"2022-06-22T07:51","dateModified":"2022-06-25T09:54","description":"In diesem Artikel ist beschrieben, wie man Apache Tomcat direkt in VSCode nutzen kann. Voraussetzung ist, dass du auf deinem Gerät bereits eine Java JRE und Apache Maven installiert hast. Weiter brauchen wir in VSCode das Extension Pack for Java, du kannst dire in VSCode…","author":{"@type":"Person","name":"Finecloud","url":"https://www.finecloud.ch/authors/finecloud/"},"publisher":{"@type":"Organization","name":"Finecloud"}}</script><meta name="google-site-verification" content="seFY9U12uiEq5U3_MyZiX6XWzk0AVFl9zITr2ZKsytY"></head><body><div class="site-container"><header class="top" id="js-header"><a class="logo" href="https://www.finecloud.ch/">Finecloud</a><nav class="navbar js-navbar"><button class="navbar__toggle js-toggle" aria-label="Menu" aria-haspopup="true" aria-expanded="false"><span class="navbar__toggle-box"><span class="navbar__toggle-inner">Menu</span></span></button><ul class="navbar__menu"><li><a href="https://www.finecloud.ch/" target="_self">Blog</a></li><li><a href="https://www.finecloud.ch/tags/" target="_self">Tags</a></li></ul></nav><div class="search"><div class="search__overlay js-search-overlay"><div class="search__overlay-inner"><form action="https://www.finecloud.ch/search.html" class="search__form"><input class="search__input js-search-input" type="search" name="q" placeholder="search..." aria-label="search..." autofocus="autofocus"></form><button class="search__close js-search-close" aria-label="Close">Close</button></div></div><button class="search__btn js-search-btn" aria-label="Search"><svg role="presentation" focusable="false"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#search"/></svg></button></div></header><main><article class="post"><div class="hero"><figure class="hero__image hero__image--overlay"><img src="https://www.finecloud.ch/media/website/download.jpg" srcset="https://www.finecloud.ch/media/website/responsive/download-xs.jpg 300w, https://www.finecloud.ch/media/website/responsive/download-sm.jpg 480w, https://www.finecloud.ch/media/website/responsive/download-md.jpg 768w, https://www.finecloud.ch/media/website/responsive/download-lg.jpg 1024w, https://www.finecloud.ch/media/website/responsive/download-xl.jpg 1360w, https://www.finecloud.ch/media/website/responsive/download-2xl.jpg 1600w" sizes="100vw" loading="eager" alt=""></figure><header class="hero__content"><div class="wrapper"><div class="post__meta"><time datetime="2022-06-22T07:51">Juni 22, 2022</time></div><h1>Java Serverlet mit Tomcat und Maven in VSCode</h1></div></header></div><div class="wrapper post__entry"><p>In <a href="https://www.finecloud.ch/java-serverlet-entwickeln-mit-vscode.html" rel="nofollow">diesem Artikel</a> ist beschrieben, wie man Apache Tomcat direkt in VSCode nutzen kann.<a href="https://www.finecloud.ch/java-serverlet-entwickeln-mit-vscode.html" rel="nofollow"></a></p><p>Voraussetzung ist, dass du auf deinem Gerät bereits eine Java JRE und Apache Maven installiert hast. Weiter brauchen wir in VSCode das <em>Extension Pack for Java</em>, du kannst dire in VSCode installieren, wenn du <em>CTRL + SHIFT + X</em> und dann <code>vscode:extension/vscjava.vscode-java-pack</code> eingibst.</p><h2>Maven Projekt anlegen</h2><p>Als erster Schritt legen wir ein neues Maven Projekt an:</p><ul><li>Aus VSCode mit <em>Strg+Shift+P</em>, dann</li><li>Wählen Sie <code>Maven: Create Maven-Procekt</code></li><li>Wählen Sie <code>maven-archetype-quickstart</code></li><li>Wählen Sie die aktuelle Vision wie <code>1.4</code></li><li>Geben Sie Ihre Gruppen-ID wie <code>com.testservlet</code> ein</li><li>Geben Sie Ihre Artefakt-ID wie <code>servlet</code> ein</li><li>Suchen Sie Ihren Zielordner, den Sie zuvor erstellt haben, und generieren Sie dort das Projekt.</li></ul><h2>Task File anlegen</h2><p>Wir müssen nun ein tasks file konfigurieren das besagt wie das Maven Projekt zu kompilieren ist.</p><ul><li>Aus VSCode mit <em>Strg+Shift+P</em>, dann</li><li><code style="font-weight: var(--font-weight-normal);">Tasks: Configure task</code></li><li><code style="font-weight: var(--font-weight-normal);">Create tasks.json from template</code></li><li><code style="font-weight: var(--font-weight-normal);">maven: executes common maven command</code></li></ul><p>Anschliessen wir ein leeres default <strong>tasks.json</strong> file generiert. Das passen wir nun so an:</p><pre class="hljs" style="color: #a9b7c6; background: #282b2e none repeat scroll 0% 0%; display: block; overflow-x: auto; padding: 0.5em;">{
<span class="hljs-attr">"version"</span>: <span class="hljs-string" style="color: #6a8759;">"2.0.0"</span>,
<span class="hljs-attr">"tasks"</span>: [
{
<span class="hljs-attr">"label"</span>: <span class="hljs-string" style="color: #6a8759;">"compile"</span>,
<span class="hljs-attr">"type"</span>: <span class="hljs-string" style="color: #6a8759;">"shell"</span>,
<span class="hljs-attr">"command"</span>: <span class="hljs-string" style="color: #6a8759;">"mvn -B compile"</span>,
<span class="hljs-attr">"group"</span>: <span class="hljs-string" style="color: #6a8759;">"build"</span>
},
{
<span class="hljs-attr">"label"</span>: <span class="hljs-string" style="color: #6a8759;">"test"</span>,
<span class="hljs-attr">"type"</span>: <span class="hljs-string" style="color: #6a8759;">"shell"</span>,
<span class="hljs-attr">"command"</span>: <span class="hljs-string" style="color: #6a8759;">"mvn -B test"</span>,
<span class="hljs-attr">"group"</span>: <span class="hljs-string" style="color: #6a8759;">"test"</span>
}
]
}
</pre><p>Nun kompilieren wir unser maven Projekt, dazu in VSCode in der top bar auf <code>Terminal</code>, <code>Run Build Task</code><em> </em>und dann <code>compile</code>.</p><h2>Dependencies hinzufügen</h2><p>Bevor wir loslegen können, müssen wir für unser Servlet noch wesentliche Dependencies deklarieren, ansonsten kann das Servlet nicht erstellt werden. Dazu fügen wir im <code>pom.xml</code>File folgenden Inhalt hinzu:</p><pre class="hljs" style="color: #a9b7c6; background: #282b2e none repeat scroll 0% 0%; display: block; overflow-x: auto; padding: 0.5em;"><span class="hljs-attribute" style="color: #6a8759;"><dependency></span>
<span class="hljs-attribute" style="color: #6a8759;"><groupId></span>javax.servlet<span class="hljs-attribute" style="color: #6a8759;"></groupId></span>
<span class="hljs-attribute" style="color: #6a8759;"><artifactId></span>javax.servlet-api<span class="hljs-attribute" style="color: #6a8759;"></artifactId></span>
<span class="hljs-attribute" style="color: #6a8759;"><version></span>4.0.1<span class="hljs-attribute" style="color: #6a8759;"></version></span>
<span class="hljs-attribute" style="color: #6a8759;"><scope></span>provided<span class="hljs-attribute" style="color: #6a8759;"></scope></span>
<span class="hljs-attribute" style="color: #6a8759;"></dependency></span>
<span class="hljs-attribute" style="color: #6a8759;"><dependency></span>
<span class="hljs-attribute" style="color: #6a8759;"><groupId></span>javax.servlet<span class="hljs-attribute" style="color: #6a8759;"></groupId></span>
<span class="hljs-attribute" style="color: #6a8759;"><artifactId></span>jstl<span class="hljs-attribute" style="color: #6a8759;"></artifactId></span>
<span class="hljs-attribute" style="color: #6a8759;"><version></span>1.2<span class="hljs-attribute" style="color: #6a8759;"></version></span>
<span class="hljs-attribute" style="color: #6a8759;"></dependency></span>
<span class="hljs-attribute" style="color: #6a8759;"><dependency></span>
<span class="hljs-attribute" style="color: #6a8759;"><groupId></span>javax<span class="hljs-attribute" style="color: #6a8759;"></groupId></span>
<span class="hljs-attribute" style="color: #6a8759;"><artifactId></span>javaee-web-api<span class="hljs-attribute" style="color: #6a8759;"></artifactId></span>
<span class="hljs-attribute" style="color: #6a8759;"><version></span>8.0<span class="hljs-attribute" style="color: #6a8759;"></version></span>
<span class="hljs-attribute" style="color: #6a8759;"><scope></span>provided<span class="hljs-attribute" style="color: #6a8759;"></scope></span>
<span class="hljs-attribute" style="color: #6a8759;"></dependency></span></pre><h2>Servlet erstellen</h2><p>Wir löschen die default Klasse App.java und erstellen folgende neue NewServlet.java Klasse unter diesem Pfad: <code>src\main\java\com\myservlet\NewServlet.java</code></p><pre class="hljs" style="color: #a9b7c6; background: #282b2e none repeat scroll 0% 0%; display: block; overflow-x: auto; padding: 0.5em;"><span class="hljs-keyword" style="color: #cc7832;">package</span> com.myservlet;
<span class="hljs-keyword" style="color: #cc7832;">import</span> java.io.IOException;
<span class="hljs-keyword" style="color: #cc7832;">import</span> java.io.PrintWriter;
<span class="hljs-keyword" style="color: #cc7832;">import</span> javax.servlet.ServletException;
<span class="hljs-keyword" style="color: #cc7832;">import</span> javax.servlet.annotation.WebServlet;
<span class="hljs-keyword" style="color: #cc7832;">import</span> javax.servlet.http.HttpServlet;
<span class="hljs-keyword" style="color: #cc7832;">import</span> javax.servlet.http.HttpServletRequest;
<span class="hljs-keyword" style="color: #cc7832;">import</span> javax.servlet.http.HttpServletResponse;
<span class="hljs-comment" style="color: grey;">/**
* NewServlet
*/</span>
<span class="hljs-meta" style="color: #bbb529;">@WebServlet</span>(urlPatterns = <span class="hljs-string" style="color: #6a8759;">"/mambo.do"</span>)
<span class="hljs-keyword" style="color: #cc7832;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="color: #cc7832;">class</span> <span class="hljs-title" style="color: #ffc66d;">NewServlet</span> <span class="hljs-keyword" style="color: #cc7832;">extends</span> <span class="hljs-title" style="color: #ffc66d;">HttpServlet</span> </span>{
<span class="hljs-comment" style="color: grey;">/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* <span class="hljs-doctag">@param</span> request servlet request
* <span class="hljs-doctag">@param</span> response servlet response
* <span class="hljs-doctag">@throws</span> ServletException if a servlet-specific error occurs
* <span class="hljs-doctag">@throws</span> IOException if an I/O error occurs
*/</span>
<span class="hljs-function"><span class="hljs-keyword" style="color: #cc7832;">protected</span> <span class="hljs-keyword" style="color: #cc7832;">void</span> <span class="hljs-title" style="color: #ffc66d;">processRequest</span><span class="hljs-params">(HttpServletRequest request, HttpServletResponse response)</span>
<span class="hljs-keyword" style="color: #cc7832;">throws</span> ServletException, IOException </span>{
response.setContentType(<span class="hljs-string" style="color: #6a8759;">"text/html;charset=UTF-8"</span>);
<span class="hljs-keyword" style="color: #cc7832;">try</span> ( PrintWriter out = response.getWriter()) {
<span class="hljs-comment" style="color: grey;">/* TODO output your page here. You may use following sample code. */</span>
out.println(<span class="hljs-string" style="color: #6a8759;">"<!DOCTYPE html>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"<html>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"<head>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"<title>Servlet NewServlet</title>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"</head>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"<body>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"<h1>Servlet NewServlet at "</span> + request.getContextPath() + <span class="hljs-string" style="color: #6a8759;">"</h1>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"</body>"</span>);
out.println(<span class="hljs-string" style="color: #6a8759;">"</html>"</span>);
}
}
<span class="hljs-comment" style="color: grey;">// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."></span>
<span class="hljs-comment" style="color: grey;">/**
* Handles the HTTP <code>GET</code> method.
*
* <span class="hljs-doctag">@param</span> request servlet request
* <span class="hljs-doctag">@param</span> response servlet response
* <span class="hljs-doctag">@throws</span> ServletException if a servlet-specific error occurs
* <span class="hljs-doctag">@throws</span> IOException if an I/O error occurs
*/</span>
<span class="hljs-meta" style="color: #bbb529;">@Override</span>
<span class="hljs-function"><span class="hljs-keyword" style="color: #cc7832;">protected</span> <span class="hljs-keyword" style="color: #cc7832;">void</span> <span class="hljs-title" style="color: #ffc66d;">doGet</span><span class="hljs-params">(HttpServletRequest request, HttpServletResponse response)</span>
<span class="hljs-keyword" style="color: #cc7832;">throws</span> ServletException, IOException </span>{
processRequest(request, response);
}
<span class="hljs-comment" style="color: grey;">/**
* Handles the HTTP <code>POST</code> method.
*
* <span class="hljs-doctag">@param</span> request servlet request
* <span class="hljs-doctag">@param</span> response servlet response
* <span class="hljs-doctag">@throws</span> ServletException if a servlet-specific error occurs
* <span class="hljs-doctag">@throws</span> IOException if an I/O error occurs
*/</span>
<span class="hljs-meta" style="color: #bbb529;">@Override</span>
<span class="hljs-function"><span class="hljs-keyword" style="color: #cc7832;">protected</span> <span class="hljs-keyword" style="color: #cc7832;">void</span> <span class="hljs-title" style="color: #ffc66d;">doPost</span><span class="hljs-params">(HttpServletRequest request, HttpServletResponse response)</span>
<span class="hljs-keyword" style="color: #cc7832;">throws</span> ServletException, IOException </span>{
processRequest(request, response);
}
<span class="hljs-comment" style="color: grey;">/**
* Returns a short description of the servlet.
*
* <span class="hljs-doctag">@return</span> a String containing servlet description
*/</span>
<span class="hljs-meta" style="color: #bbb529;">@Override</span>
<span class="hljs-function"><span class="hljs-keyword" style="color: #cc7832;">public</span> String <span class="hljs-title" style="color: #ffc66d;">getServletInfo</span><span class="hljs-params">()</span> </span>{
<span class="hljs-keyword" style="color: #cc7832;">return</span> <span class="hljs-string" style="color: #6a8759;">"Short description"</span>;
}<span class="hljs-comment" style="color: grey;">// </editor-fold></span>
}
</pre><h2>web.xml File anlegen</h2><ul><li>Erstelle unter dem Pfad "src/main/" den Ordner webapp (wenn nicht bereits vorhanden).</li><li>Erstelle unter dem Pfad "src/main/webapp" den Ordner "WEB-INF" und die Datei web.xml mit dem folgenden Inhalt:</li></ul><pre class="hljs" style="color: #a9b7c6; background: #282b2e none repeat scroll 0% 0%; display: block; overflow-x: auto; padding: 0.5em;"><web-<span class="hljs-keyword" style="color: #cc7832;">app</span> xmlns=<span class="hljs-string" style="color: #6a8759;">"http://java.sun.com/xml/ns/javaee"</span> xmlns:xsi=<span class="hljs-string" style="color: #6a8759;">"http://www.w3.org/2001/XMLSchema-instance"</span>
xsi:schemaLocation=<span class="hljs-string" style="color: #6a8759;">"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"</span>
<span class="hljs-keyword" style="color: #cc7832;">version</span>=<span class="hljs-string" style="color: #6a8759;">"3.0"</span>>
<<span class="hljs-keyword" style="color: #cc7832;">display</span>-name>To <span class="hljs-keyword" style="color: #cc7832;">do</span> <span class="hljs-keyword" style="color: #cc7832;">List</span></<span class="hljs-keyword" style="color: #cc7832;">display</span>-name>
<welcome-<span class="hljs-keyword" style="color: #cc7832;">file</span>-<span class="hljs-keyword" style="color: #cc7832;">list</span>>
<welcome-<span class="hljs-keyword" style="color: #cc7832;">file</span>>mambo.<span class="hljs-keyword" style="color: #cc7832;">do</span></welcome-<span class="hljs-keyword" style="color: #cc7832;">file</span>>
</welcome-<span class="hljs-keyword" style="color: #cc7832;">file</span>-<span class="hljs-keyword" style="color: #cc7832;">list</span>>
</web-<span class="hljs-keyword" style="color: #cc7832;">app</span>>
</pre><h2>war File erstellen</h2><p>Bevor wir die war Datei erstellen können, müssen wir sicherstellen, dass in der pom.xml Datei nicht ein jar erstellt wird, sondern ein war:</p><pre class="hljs" style="color: #a9b7c6; background: #282b2e none repeat scroll 0% 0%; display: block; overflow-x: auto; padding: 0.5em;"> <span class="hljs-attribute" style="color: #6a8759;"><groupId></span>com.myservlet<span class="hljs-attribute" style="color: #6a8759;"></groupId></span>
<span class="hljs-attribute" style="color: #6a8759;"><artifactId></span>servlet<span class="hljs-attribute" style="color: #6a8759;"></artifactId></span>
<span class="hljs-attribute" style="color: #6a8759;"><version></span>1.0-SNAPSHOT<span class="hljs-attribute" style="color: #6a8759;"></version></span>
<span class="hljs-attribute" style="color: #6a8759;"><packaging></span>war<span class="hljs-attribute" style="color: #6a8759;"></packaging></span></pre><p>Nun können wir die war Datei kompilieren, dazu im Menu von VSCode auf Terminal -> Run Build Task -> compile klicken. Nachdem die war Datei kompiliert wurde, muss auf der Konsole, im Projektverzeichnis noch </p><pre class="hljs" style="color: #a9b7c6; background: #282b2e none repeat scroll 0% 0%; display: block; overflow-x: auto; padding: 0.5em;"># mvn clean package</pre><p>ausgeführt werden. Sofern die war Datei nun erfolgreich erstellt wurde, können wir diese nun auf den Tomcat deployen.</p><h2>War File auf lokalen Tomcat deployen</h2><p>In <a href="https://www.finecloud.ch/java-serverlets.html" rel="nofollow">diesem Artikel</a> steht, wie du ein Tomcat direkt in VSCode verwenden kannst.</p><p>Starte den Tomcat Server, und mache ein Rechtsklick auf den Server und wähle "Add Deployment", wähle "File". Anschliessend lade das zuvor erstellte war File hoch. Das war File wird in der Regel im Projektordner unter "target" abgelegt. Bei der Frage "Do you want to edit optional deployment parameters", wähle "no". Nun musst du noch mit einem Rechtsklick auf den Server "Publish Server (Full)" auswählen, damit die war Datei aktiv wird.</p><p>Endlich kannst du in deinem Browser unter dieser URL dein servlet aufrufen: <a href="http://localhost:8080/servlet-1.0-SNAPSHOT/">http://localhost:8080/servlet-1.0-SNAPSHOT/</a></p><p>Alternativ kannst du mit Rechtsklick auf den Server "Server Actions", "Show in Browser" auswählen.</p><p> </p><p> </p></div><footer class="wrapper post__footer"><p class="post__last-updated">This article was updated on Juni 25, 2022</p><ul class="post__tag"><li><a href="https://www.finecloud.ch/tags/java/">java</a></li><li><a href="https://www.finecloud.ch/tags/maven/">maven</a></li><li><a href="https://www.finecloud.ch/tags/network/">network</a></li><li><a href="https://www.finecloud.ch/tags/servlet/">servlet</a></li><li><a href="https://www.finecloud.ch/tags/softwareentwicklung/">software development</a></li><li><a href="https://www.finecloud.ch/tags/vscode/">vscode</a></li></ul><div class="post__share"></div></footer></article><nav class="post__nav"><div class="post__nav-inner"><div class="post__nav-prev"><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#arrow-prev"/></svg> <a href="https://www.finecloud.ch/java-serverlets.html" class="post__nav-link" rel="prev"><span>Previous</span> Java Serverlet Container installieren</a></div><div class="post__nav-next"><a href="https://www.finecloud.ch/toc-in-readmemd-erstellen.html" class="post__nav-link" rel="next"><span>Next</span> TOC in README.md erstellen mit VSCode </a><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#arrow-next"/></svg></div></div></nav><div class="post__related related"><div class="wrapper"><h2 class="h5 related__title">You should also read:</h2><article class="related__item"><div class="feed__meta"><time datetime="2022-05-26T14:07" class="feed__date">Mai 26, 2022</time></div><h3 class="h1"><a href="https://www.finecloud.ch/java-collection-iteratoren.html">Java Collection Iteratoren</a></h3></article><article class="related__item"><div class="feed__meta"><time datetime="2022-05-26T13:28" class="feed__date">Mai 26, 2022</time></div><h3 class="h1"><a href="https://www.finecloud.ch/java-collection-sets.html">Java Collection Sets</a></h3></article><article class="related__item"><div class="feed__meta"><time datetime="2022-05-26T13:19" class="feed__date">Mai 26, 2022</time></div><h3 class="h1"><a href="https://www.finecloud.ch/java-collection-listen.html">Java Collection Listen</a></h3></article></div></div></main><footer class="footer"><div class="footer__copyright"><p>Powered by Publii</p></div><button onclick="backToTopFunction()" id="backToTop" class="footer__bttop" aria-label="Back to top" title="Back to top"><svg><use xlink:href="https://www.finecloud.ch/assets/svg/svg-map.svg#toparrow"/></svg></button></footer></div><script>window.publiiThemeMenuConfig = {
mobileMenuMode: 'sidebar',
animationSpeed: 300,
submenuWidth: 'auto',
doubleClickTime: 500,
mobileMenuExpandableSubmenus: true,
relatedContainerForOverlayMenuSelector: '.top',
};</script><script defer="defer" src="https://www.finecloud.ch/assets/js/scripts.min.js?v=6ca8b60e6534a3888de1205e82df8528"></script><script>var images = document.querySelectorAll('img[loading]');
for (var i = 0; i < images.length; i++) {
if (images[i].complete) {
images[i].classList.add('is-loaded');
} else {
images[i].addEventListener('load', function () {
this.classList.add('is-loaded');
}, false);
}
}</script><script defer="defer" src="https://www.finecloud.ch/media/plugins/syntaxHighlighter/prism.js"></script></body></html>