<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>java Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 23 Sep 2021 15:22:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Top 5 Java Errors with Solutions</title>
		<link>https://www.osradar.com/top-5-java-errors-with-solutions/</link>
					<comments>https://www.osradar.com/top-5-java-errors-with-solutions/#respond</comments>
		
		<dc:creator><![CDATA[Paul M]]></dc:creator>
		<pubDate>Thu, 23 Sep 2021 15:18:54 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Java Errors]]></category>
		<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=32408</guid>

					<description><![CDATA[<p>A beginner in any domain is prone to making mistakes, and a lot of mistakes. But if you’re gutsy enough to learn to program, then make these errors 10x than any other thing you’ve ever learned before. All experts were once beginners. And all beginners make mistakes, get stuck, frustrated, and exhausted meanwhile. But if [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/top-5-java-errors-with-solutions/">Top 5 Java Errors with Solutions</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>A beginner in any domain is prone to making mistakes, and a lot of mistakes. But if you’re gutsy enough to learn to program, then make these errors 10x than any other thing you’ve ever learned before. All experts were once beginners. And all beginners make mistakes, get stuck, frustrated, and exhausted meanwhile. But if you’re serious about your development career, stick around till you’re comfortable with problem-solving, debugging, and exception handling. As a learner, we advise you to get in touch with any credible <a href="https://codegym.cc/groups/posts">java programming blog</a>. Going through quality subject matter will polish your programming skills in a rather seamless way.</p>



<p>Let’s look at some of the most recurring errors by freshmen.</p>



<h2><a></a><strong>Illegal Type Assignment</strong></h2>



<p>Java restricts its users to assign only the same type of variables. On a simpler note, you can not assign an “Integer” type value to a “Double” type variable.</p>



<h3><a></a>Example</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>public class IllegalTypeAssignment {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int first = 25;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Double second = first;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.print(&#8220;Is first equal to second? &#8220;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (first == second) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.print(true);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.print(false);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}</td></tr></tbody></table></figure>



<h3><a></a>Output</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Exception in thread &#8220;main&#8221; java.lang.Error: Unresolved compilation problem:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type mismatch: cannot convert from int to Double</td></tr></tbody></table></figure>



<h3><a></a>Solution</h3>



<p>Replace line 5 of the above program for casting in to double. Test the output in your IDE.</p>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Double second = (double)first;</td></tr></tbody></table></figure>



<h2><a></a><strong>Invalid Return Type</strong></h2>



<p>By the rules of the Java language, you can only return the type of variable specified as the return type. A void type method is not capable of returning a String if you try to do so. And hence, you will get a compile-time error.</p>



<h3><a></a>Example</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>public class InvalidReturnType {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void printName(String name) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(name);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return name;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String name = &#8220;Lubaina Khan&#8221;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printName(name);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}</td></tr></tbody></table></figure>



<h3><a></a>Output</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Exception in thread &#8220;main&#8221; java.lang.Error: Unresolved compilation problem:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Void methods cannot return a value<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at InvalidReturnType.printName(InvalidReturnType.java:4)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at InvalidReturnType.main(InvalidReturnType.java:8)</td></tr></tbody></table></figure>



<h3><a></a>Solution</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Remove line 4 to run this void method properly.</td></tr></tbody></table></figure>



<h2><a></a><strong>Invalid Arguments Type</strong></h2>



<p>Let’s say you define a method passing two arguments. This method takes two integers to find their sum. Now if you try to pass two floating points in place of two integers, java will give you a compile-time error.</p>



<h3><a></a>Example</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>public class InvalidArgumentsType {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static Double sum(Double x, Double y) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return x + y;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float x = 5;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int y = 2;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&#8220;Sum of &#8221; + x + &#8221; and &#8221; + y + &#8221; = &#8221; + sum(x,y));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}</td></tr></tbody></table></figure>



<h3><a></a>Output</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Exception in thread &#8220;main&#8221; java.lang.Error: Unresolved compilation problem:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The method sum(Double, Double) in the type InvalidArgumentsType is not applicable for the arguments (float, int)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at InvalidArgumentsType.main(InvalidArgumentsType.java:8)</td></tr></tbody></table></figure>



<h3><a></a>Solution</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Either declare both variables of type &#8220;Double&#8221; or alter the method header to accept &#8220;float&#8221; and &#8220;int&#8221; type arguments</td></tr></tbody></table></figure>



<h2><a></a><strong>Null Pointer Exceptions</strong></h2>



<p>These are most redundant and tricky to handle as a novice. However, there’s no rocket science behind it if you take care of some fundamentals. A null pointer exception arises when you try to access a resource whose value is null and not initialized to a concrete value. Majorly, the null pointer is used to allocate a unique reference to a resource. If you do not have such a requirement then make sure all values are initialized properly before accessing them.</p>



<h3><a></a>Example 1</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>public class NullPtrException {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String name = null;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&#8220;Length of name is &#8221; + name.length());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}</td></tr></tbody></table></figure>



<h3><a></a>Output 1</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Exception in thread &#8220;main&#8221; java.lang.NullPointerException<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at NullPtrException.main(NullPtrException.java:4)</td></tr></tbody></table></figure>



<h3><a></a>Solution 1</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Initialize &#8220;name&#8221; to a string literal say &#8220;Alexa&#8221; and test the output.</td></tr></tbody></table></figure>



<h3><a></a>Example 2</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>public class NullPtrException {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static int getEven(int num) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return num % 2;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int[] arr = { 2, 3, 5, (Integer) null};<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i : arr) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.print(&#8220;Is &#8221; + i + &#8221; even? &#8220;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (getEven(i) != 1) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(true);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(false);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}</td></tr></tbody></table></figure>



<h3><a></a>Output 2</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Exception in thread &#8220;main&#8221; java.lang.NullPointerException<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at NullPtrException.main(NullPtrException.java:7)</td></tr></tbody></table></figure>



<h3><a></a>Solution 2</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Initialize the arr[3] to a valid integer.</td></tr></tbody></table></figure>



<p>Another advanced way to resolve un-checked exceptions like null pointer exceptions is the exception handling mechanism in Java. Feel free to check out <a href="https://codegym.cc/groups/posts/exceptions-in-java">java exceptions examples</a> for a more profound understanding.</p>



<h2><a></a><strong>Syntax Errors</strong></h2>



<p><em>Anything that does not comply with the Java language rules is categorized as a syntax error.<br></em>From beginners to experts, we all are guilty of it at some point. If you have just started working in Java, you must comprehend what I’m talking about. The analogy of syntax rules can be grammatical rules in the English language. The syntax is defined to maintain the standards across the board. Not following naming conventions, misplaced semicolons, un-balanced parenthesis, and misspelled method names, etc are some of the typical syntax errors.</p>



<h3><a></a>Example</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>public class SyntaxError {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int[] arr = { 2, 3, 5};<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i ; arr) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(i);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}</td></tr></tbody></table></figure>



<h3><a></a>Output</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Exception in thread &#8220;main&#8221; java.lang.Error: Unresolved compilation problem:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Syntax error on token &#8220;;&#8221;, : expected<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at SyntaxError.main(SyntaxError.java:4)</td></tr></tbody></table></figure>



<h3><a></a>Solution</h3>



<figure class="wp-block-table"><table class="has-white-color has-black-background-color has-text-color has-background"><tbody><tr><td>Replace the semicolon after &#8220;i&#8221; with a colon (:) in line 4.<br>for (int i : arr)</td></tr></tbody></table></figure>



<h2><a></a><strong>&nbsp;</strong></h2>



<h2><a></a><strong>Conclusion</strong></h2>



<p>By this point, you must be aware of the most recurring java errors of beginners. It’s okay to have loads of errors when you start learning. The key is not to get afraid of them, and rather keep improving yourself. Till then, keep growing! 🙂 </p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/top-5-java-errors-with-solutions/">Top 5 Java Errors with Solutions</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/top-5-java-errors-with-solutions/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install Java on Debian 11</title>
		<link>https://www.osradar.com/install-java-debian-programming-language/</link>
					<comments>https://www.osradar.com/install-java-debian-programming-language/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sun, 29 Aug 2021 23:22:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bullseye]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=31852</guid>

					<description><![CDATA[<p>Hello, friends. Old rockers never die and that’s why languages like Java don’t either. Many important tools are created in this language. In this post, you will learn quickly and easily how to install Java on Debian 11. This post can be the basis for you to get into this programming language. Besides this, it [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-java-debian-programming-language/">Install Java on Debian 11</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello, friends. Old rockers never die and that’s why languages like Java don’t either. Many important tools are created in this language. In this post, you will learn quickly and easily how to install Java on Debian 11. This post can be the basis for you to get into this programming language. Besides this, it is also the basis for the installation of many other applications.</p>



<p class="has-line-data">Java is one of the preferred languages by many developers but it is also necessary to run other very important software. In this sense, Oracle from time to time releases a new version that includes good news.</p>



<p class="has-line-data">So, if you are a developer and want to try Java on Debian 11, this post will help you with that.</p>



<h2 class="code-line"><a id="Install_Java_on_Debian_11_6"></a>Install Java on Debian 11</h2>



<p class="has-line-data">In the Debian 11 stable repositories we have the presence of <a href="https://openjdk.java.net/" target="_blank" rel="noreferrer noopener">OpenJDK which is a free Java implementation</a>. We will be able to use and install it without compatibility problems because it is the same as the version distributed by Oracle.</p>



<p class="has-line-data">For the sake of stability and compatibility with most applications, Debian 11 includes Java 11. This version besides being LTS is the base on which many important applications have been built.</p>



<p class="has-line-data">So, this is the version we will install.</p>



<p class="has-line-data">To install both the JDK (Java Development Kit) and the JRE (Java Runtime Environment) just execute in a terminal this pair of commands</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt install default-jdk
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libasound2 libasound2-data
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libfontconfig1
  libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg62-turbo liblcms2-2 libllvm11 libnspr4 libnss3
  libpciaccess0 libpcsclite1 libsensors-config libsensors5 libvulkan1 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 libz3-4
  openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless x11-common
Suggested packages:
  libasound2-plugins alsa-utils cups-common liblcms2-utils pciutils pcscd lm-sensors openjdk-11-demo openjdk-11-source visualvm libnss-mdns fonts-dejavu-extra
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
Recommended packages:
  alsa-ucm-conf alsa-topology-conf mesa-vulkan-drivers | vulkan-icd libxt-dev libatk-wrapper-java-jni fonts-dejavu-extra
The following NEW packages will be installed:
  ca-certificates-java default-jdk default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libasound2 libasound2-data
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libfontconfig1
  libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg62-turbo liblcms2-2 libllvm11 libnspr4 libnss3
  libpciaccess0 libpcsclite1 libsensors-config libsensors5 libvulkan1 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 libz3-4
  openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless x11-common
0 upgraded, 67 newly installed, 0 to remove and 2 not upgraded.
Need to get 306 MB of archives.
After this operation, 574 MB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<p class="has-line-data">In case you only want to install the JRE which is enough to run certain applications made with Java,</p>



<pre class="wp-block-preformatted">sudo apt install default-jre</pre>



<p class="has-line-data">At the end of the process, Java will be installed on your computer.</p>



<h3 class="code-line"><a id="Configuring_the_Environment_Variable_25"></a>Configuring the Environment Variable</h3>



<p class="has-line-data">Once Java is installed, it is a good idea to set the <code>JAVA_HOME</code> environment variable that tells the system the path where Java is installed. This step, although optional for this post, may be necessary when installing more complex applications.</p>



<p class="has-line-data">So, to know where JAVA is installed, just run the following command</p>



<pre class="wp-block-preformatted">sudo update-alternatives --config java</pre>



<p class="has-line-data">There you will be shown a screen where you can choose between several versions of Java installed. Of course, in this case, you should only see version 11 that was installed, but the important thing is that it will also show you the path where it will be.</p>



<p class="has-line-data">In this case OpenJDK 11 is located at <code>/usr/lib/jvm/java-11-openjdk-amd64/bin/java</code>.</p>



<p class="has-line-data">With this information, we can edit the <code>/etc/environment</code> file.</p>



<pre class="wp-block-preformatted">sudo nano /etc/environment</pre>



<p class="has-line-data">And add the following to the end of the file</p>



<pre class="wp-block-preformatted">JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"</pre>



<p class="has-line-data">Save the changes and close the text editor.</p>



<p class="has-line-data">Apply the changes</p>



<pre class="wp-block-preformatted">source /etc/environment</pre>



<p class="has-line-data">Finally, the environment variable has been set correctly. To demonstrate this, run</p>



<pre class="wp-block-preformatted">echo $JAVA_HOME</pre>



<p class="has-line-data">Sample Output:</p>



<pre class="wp-block-preformatted">/usr/lib/jvm/java-11-openjdk-amd64</pre>



<p class="has-line-data">So, Java is installed without problems. Enjoy it!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-java-debian-programming-language/">Install Java on Debian 11</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-java-debian-programming-language/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install Wildfly (JBoss) on Debian 10</title>
		<link>https://www.osradar.com/install-wildfly-jboss-on-debian-10/</link>
					<comments>https://www.osradar.com/install-wildfly-jboss-on-debian-10/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 16 Jul 2021 23:23:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Wildfly]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=31236</guid>

					<description><![CDATA[<p>Hello, friends. This post will be really useful if you consider yourself a JavaEE developer. In this post, you will learn how to install Wildfly (JBoss) on Debian 10. This way you will have an application server that you can use for deploying Java applications. According to the Wildfly website: WildFly is a flexible, lightweight, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-wildfly-jboss-on-debian-10/">Install Wildfly (JBoss) on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello, friends. This post will be really useful if you consider yourself a JavaEE developer. In this post, you will learn how to install Wildfly (JBoss) on Debian 10. This way you will have an application server that you can use for deploying Java applications.</p>



<p class="has-line-data">According to the <a href="https://www.wildfly.org/about/">Wildfly website</a>:</p>



<blockquote class="wp-block-quote"><p class="has-line-data" data-line-start="4" data-line-end="5">WildFly is a flexible, lightweight, managed application runtime that helps you build amazing applications.</p></blockquote>



<p class="has-line-data">Being Java-based, it is compatible with many operating systems such as Linux, macOS, and Windows. In addition to this, it is open source which can help us with licensing issues.</p>



<p class="has-line-data">So, now you will learn how to install it on a Debian 10 server or your computer for development.</p>



<h2 class="code-line"><a id="Install_Wildfly_on_Debian_10_10"></a>Install Wildfly on Debian 10</h2>



<p class="has-line-data">Before we start, open a terminal and update Debian 10. In this post, we will use <code>sudo</code> if you don’t know how to enable it in Debian, we tell you in this post.</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p class="has-line-data">Now it is time to install Java if you don’t have it on your system.</p>



<pre class="wp-block-preformatted">sudo apt install default-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libasound2 libasound2-data
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libfontconfig1
  libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg62-turbo liblcms2-2 libllvm7 libnspr4 libnss3
  libpciaccess0 libpcsclite1 libsensors-config libsensors5 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-sync1 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 openjdk-11-jdk openjdk-11-jdk-headless
  openjdk-11-jre openjdk-11-jre-headless x11-common
Suggested packages:
  libasound2-plugins alsa-utils cups-common liblcms2-utils pciutils pcscd lm-sensors openjdk-11-demo openjdk-11-source visualvm libnss-mdns fonts-dejavu-extra
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
Recommended packages:
  libxt-dev libatk-wrapper-java-jni fonts-dejavu-extra
The following NEW packages will be installed:
  ca-certificates-java default-jdk default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libasound2 libasound2-data
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libfontconfig1
  libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg62-turbo liblcms2-2 libllvm7 libnspr4 libnss3
  libpciaccess0 libpcsclite1 libsensors-config libsensors5 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-sync1 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 openjdk-11-jdk openjdk-11-jdk-headless
  openjdk-11-jre openjdk-11-jre-headless x11-common
0 upgraded, 63 newly installed, 0 to remove and 26 not upgraded.
Need to get 289 MB of archives.
After this operation, 637 MB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<p class="has-line-data">It is recommended to create a new user and group for Wildfly so that it does not interfere with the others. First, create a group like this</p>



<pre class="wp-block-preformatted">sudo groupadd -r wildfly</pre>



<p class="has-line-data">Now create the user:</p>



<pre class="wp-block-preformatted">sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly</pre>



<p class="has-line-data">From the previous command, we can deduce that you will not be able to log in but you will have permission over the directory <code>/opt/wildfly</code>.</p>



<p class="has-line-data">Now yes, from the <code>/tmp</code> folder, you can download Wildlfly</p>



<pre class="wp-block-preformatted">cd /tmp/
wget -c https://download.jboss.org/wildfly/24.0.0.Final/wildfly-24.0.0.Final.tar.gz
--2021-07-13 16:47:17--  https://download.jboss.org/wildfly/24.0.0.Final/wildfly-24.0.0.Final.tar.gz
Resolving download.jboss.org (download.jboss.org)... 2a02:26f0:6c00::210:bb8b, 2a02:26f0:6c00::210:bb58, 104.126.36.121, ...
Connecting to download.jboss.org (download.jboss.org)|2a02:26f0:6c00::210:bb8b|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 210418338 (201M) [application/x-gzip]
Saving to: ‘wildfly-24.0.0.Final.tar.gz’

wildfly-24.0.0.Final.tar.gz               100%[=====================================================================================>] 200.67M  40.7MB/s    in 4.8s

2021-07-13 16:47:22 (42.0 MB/s) - ‘wildfly-24.0.0.Final.tar.gz’ saved [210418338/210418338]</pre>



<p class="has-line-data">At the time of writing this post, the latest stable version of Wildfly is <code>24.0.0</code> so this command will change when a new version is released.</p>



<p class="has-line-data">Then, decompress it</p>



<pre class="wp-block-preformatted">sudo tar xfv wildfly-24.0.0.Final.tar.gz -C /opt/</pre>



<p class="has-line-data">Make a symbolic link from the folder to another folder with an easier-to-remember name.</p>



<pre class="wp-block-preformatted">sudo ln -s /opt/wildfly-24.0.0.Final/ /opt/wildfly</pre>



<p class="has-line-data">Make the user <code>wildfly</code> the owner of the folder.</p>



<pre class="wp-block-preformatted">sudo chown -RH wildfly: /opt/wildfly</pre>



<h3 class="code-line"><a id="Configuring_WildFly_on_Debian_10_50"></a>Configuring WildFly on Debian 10</h3>



<p class="has-line-data">By default, the package we have downloaded includes a configuration file that we have to enable. To do this, create a folder called <code>wildfly</code> in the <code>/etc/</code> path.</p>



<pre class="wp-block-preformatted">sudo mkdir -p /etc/wildfly</pre>



<p class="has-line-data">And to enable the default Wildfly configuration, copy the example file to this directory.</p>



<pre class="wp-block-preformatted">sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/</pre>



<p class="has-line-data">Also, copy the startup script into the <code>bin</code> folder of the dedicated Wildfly folder.</p>



<pre class="wp-block-preformatted">sudo cp /opt/wildfly/docs/contrib/scripts/systemd/systemd/launch.sh /opt/wildfly/bin/</pre>



<p class="has-line-data">After this, assign run permissions to the script.</p>



<pre class="wp-block-preformatted">sudo sh -c 'chmod +x /opt/wildfly/bin/*.sh'</pre>



<p class="has-line-data">To start, restart and stop running Wildfly then it is best to do it via <code>systemd</code>, and then we have to create a new service for it. Fortunately, the downloaded package includes one so we have to copy it to the directory where the service configurations are hosted.</p>



<pre class="wp-block-preformatted">sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/</pre>



<p class="has-line-data">Now, refresh the list of services</p>



<pre class="wp-block-preformatted">sudo systemctl daemon-reload</pre>



<p class="has-line-data">And start the service</p>



<pre class="wp-block-preformatted">sudo systemctl start wildfly</pre>



<p class="has-line-data">Also, you can check the service for any errors.</p>



<pre class="wp-block-preformatted">sudo systemctl status wildfly
● wildfly.service - The WildFly Application Server
   Loaded: loaded (/etc/systemd/system/wildfly.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-07-13 16:52:28 CEST; 2s ago
 Main PID: 4978 (launch.sh)
    Tasks: 69 (limit: 4915)
   Memory: 196.4M
   CGroup: /system.slice/wildfly.service
           ├─4978 /bin/bash /opt/wildfly/bin/launch.sh standalone standalone.xml 0.0.0.0
           ├─4979 /bin/sh /opt/wildfly/bin/standalone.sh -c standalone.xml -b 0.0.0.0
           └─5074 java -D[Standalone] -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkJul 13 16:52:28 osradar systemd[1]: Started The WildFly Application Server.</pre>



<p class="has-line-data">All that remains is to create the user with administrative permissions. To do this, run a script called <code>add-user.sh</code>.</p>



<p class="has-line-data">After entering the username, and answering a few more questions, you will be assigned a password.</p>



<pre class="wp-block-preformatted">To represent the user add the following to the server-identities definition &lt;secret value="YW5nZWxv" /></pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="410" src="https://www.osradar.com/wp-content/uploads/2021/07/1-5-1024x410.png" alt="1.- Creating a new user for Wildfly" class="wp-image-31252" srcset="https://www.osradar.com/wp-content/uploads/2021/07/1-5-1024x410.png 1024w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-300x120.png 300w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-768x308.png 768w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-696x279.png 696w, https://www.osradar.com/wp-content/uploads/2021/07/1-5-1068x428.png 1068w, https://www.osradar.com/wp-content/uploads/2021/07/1-5.png 1230w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Creating a new user for Wildfly</figcaption></figure>



<p class="has-line-data">This way, you can open your web browser and visit <code>http://localhost:8080</code> or if you installed on a server <code>http://your-server:8080</code> and see this screen.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/07/2-4-1024x511.png" alt="2.- Wildfly running on Debian 10" class="wp-image-31253" srcset="https://www.osradar.com/wp-content/uploads/2021/07/2-4-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/07/2-4-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/07/2-4.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Wildfly running on Debian 10</figcaption></figure>



<p class="has-line-data">So, Wildfly is correctly installed.</p>



<h3 class="code-line"><a id="Optional_Enable_the_administrative_panel_remotely_94"></a>Optional: Enable the administrative panel remotely</h3>



<p class="has-line-data">The administrative panel can be accessed from <code>http://localhost:9990/console</code> but if you installed Wildfly on a remote server, this will not work because, by default, this feature is disabled remotely.</p>



<p class="has-line-data">So, you can enable it. To do this, edit the Wildfly configuration file</p>



<pre class="wp-block-preformatted">sudo nano /etc/wildfly/wildfly.conf</pre>



<p class="has-line-data">And add the following line at the end.</p>



<pre class="wp-block-preformatted">WILDFLY_CONSOLE_BIND=0.0.0.0.0</pre>



<p class="has-line-data">Save the changes and close the editor.</p>



<p class="has-line-data">Now edit the WildFly startup script</p>



<pre class="wp-block-preformatted">sudo nano /opt/wildfly/bin/launch.sh</pre>



<p class="has-line-data">And replace the lines inside the second <code>if</code> that start with <code>$WILDFLY_HOME</code> with the following lines</p>



<pre class="wp-block-preformatted">$WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4
else
$WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4</pre>



<p class="has-line-data">Save the changes and close the editor.</p>



<p class="has-line-data">After this, you need to modify something in the file that manages the Wildfly service.</p>



<pre class="wp-block-preformatted">sudo nano /etc/systemd/system/wildfly.service</pre>



<p class="has-line-data">Change the <code>ExecStart</code> line to this one</p>



<pre class="wp-block-preformatted">ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_BIND $WILDFLY_CONSOLE_BIND</pre>



<p class="has-line-data">Refresh all daemons and restart the service.</p>



<pre class="wp-block-preformatted">sudo systemctl daemon-reload
sudo systemctl restart wildfly</pre>



<p class="has-line-data">You will now be able to remotely access your configuration panel.</p>



<h2 class="code-line"><a id="Conclusion_133"></a>Conclusion</h2>



<p class="has-line-data">Developing Java applications requires tools to help with the process. In this case, we have presented you with one that allows you to set up a JavaEE application server, and with Wildfly’s extensive experience we will have mature and production-ready software.</p>



<p class="has-line-data">Enjoy it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-wildfly-jboss-on-debian-10/">Install Wildfly (JBoss) on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-wildfly-jboss-on-debian-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install Play framework on Debian 10</title>
		<link>https://www.osradar.com/install-play-framework-debian-10/</link>
					<comments>https://www.osradar.com/install-play-framework-debian-10/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sun, 11 Jul 2021 23:59:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[scala]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=31107</guid>

					<description><![CDATA[<p>Hello, friends. Application development leads to the use of many different tools to make the process faster. Some of these tools are more or less complex according to what is required, but today we will show you how to install Play Framework on Debian 10. This Java and Scala compatible framework will allow you to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-play-framework-debian-10/">Install Play framework on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello, friends. Application development leads to the use of many different tools to make the process faster. Some of these tools are more or less complex according to what is required, but today we will show you how to install Play Framework on Debian 10. This Java and Scala compatible framework will allow you to make quite robust web applications.</p>



<h2 class="code-line"><a id="What_is_Play_Framework_2"></a>What is Play Framework?</h2>



<p class="has-line-data"><a href="https://www.playframework.com/">Play Framework</a> is a framework that allows us to make <strong>web applications with Java &amp; Scala in a fast and easy way</strong>. These applications are based on scalability and the possibility that they can be adapted to many different needs.</p>



<p class="has-line-data">Like many current frameworks, <strong>it uses the MVC pattern for the logical processing of the applications</strong>. In addition to this, it has a lot of community support as well as brilliant official documentation.</p>



<p class="has-line-data">So with this introduction to Play, we can start the installation process.</p>



<h2 class="code-line"><a id="Install_Play_Framework_on_Debian_10_10"></a>Install Play Framework on Debian 10</h2>



<p class="has-line-data">Normally you would install this framework on a local computer, but it also works on a remote server.</p>



<p class="has-line-data">So, open a terminal and update Debian</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p class="has-line-data">After that, you can install some necessary packages. Normally you should already have them but it’s always good to be sure.</p>



<pre class="wp-block-preformatted">sudo apt install git unzip zip curl</pre>



<p class="has-line-data">Then, with the <a href="https://www.osradar.com/how-to-use-curl-command-linux/" target="_blank" rel="noreferrer noopener"><code>curl</code> </a>command we have to download the SDK install script with which we will install <code>sbt</code> which is the tool with which we will finally manage the projects made with Play Framework.</p>



<pre class="wp-block-preformatted">curl -s "https://get.sdkman.io" | bash</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="680" height="236" src="https://www.osradar.com/wp-content/uploads/2021/07/1-1.png" alt="1.- SDK on Debian 10" class="wp-image-31122" srcset="https://www.osradar.com/wp-content/uploads/2021/07/1-1.png 680w, https://www.osradar.com/wp-content/uploads/2021/07/1-1-300x104.png 300w" sizes="(max-width: 680px) 100vw, 680px" /><figcaption>1.- SDK on Debian 10</figcaption></figure>



<p class="has-line-data">At the end of the process, it is necessary to refresh the user’s PATH.</p>



<pre class="wp-block-preformatted">source "$HOME/.sdkman/bin/sdkman-init.sh"</pre>



<p class="has-line-data">Now check the installed SDK version with the following command:</p>



<pre class="wp-block-preformatted">sdk version</pre>



<p class="has-line-data">Sample Output</p>



<pre class="wp-block-preformatted">==== BROADCAST =================================================================
* 2021-07-02: grails 3.3.14 available on SDKMAN!
* 2021-07-02: gradle 7.1.1 available on SDKMAN!
* 2021-07-01: grails 3.3.13 available on SDKMAN!
================================================================================

SDKMAN 5.11.6</pre>



<p class="has-line-data">When using the SDK, you should then <a href="https://www.osradar.com/install-java-16-debian-10/" target="_blank" rel="noreferrer noopener">install Java</a>. To do this, you can run the following command:</p>



<pre class="wp-block-preformatted">sdk install java $(sdk list java | grep -o "8\.[0-9]*\.[0-9]*\.hs-adpt" | head -1)</pre>



<p class="has-line-data">Sample output:</p>



<pre class="wp-block-preformatted">Done repackaging...

Installing: java 8.0.292.hs-adpt
Done installing!


Setting java 8.0.292.hs-adpt as default.
</pre>



<p class="has-line-data">now it uses SDK to install <code>sbt</code>.</p>



<pre class="wp-block-preformatted">sdk install sbt</pre>



<p class="has-line-data">Sample Output:</p>



<pre class="wp-block-preformatted">Installing: sbt 1.5.4
Done installing!

Setting sbt 1.5.4 as default.</pre>



<h3 class="code-line"><a id="Download_the_sample_project_for_Play_Framework_55"></a>Download the sample project for Play Framework</h3>



<p class="has-line-data">Make sure you are in your home folder and from there with the <code>git</code> command download the sample project.</p>



<pre class="wp-block-preformatted">cd ~
git clone https://github.com/playframework/play-samples.git
Cloning into 'play-samples'...
remote: Enumerating objects: 16564, done.
remote: Counting objects: 100% (362/362), done.
remote: Compressing objects: 100% (246/246), done.
remote: Total 16564 (delta 210), reused 199 (delta 105), pack-reused 16202
Receiving objects: 100% (16564/16564), 5.32 MiB | 12.35 MiB/s, done.
Resolving deltas: 100% (9846/9846), done.</pre>



<p class="has-line-data">Access the downloaded folder</p>



<pre class="wp-block-preformatted">cd play-samples/play-scala-hello-world-tutorial</pre>



<p class="has-line-data">And run the project</p>



<pre class="wp-block-preformatted">sbt run</pre>



<p class="has-line-data">This will make it available at <code>http://localhost:9000</code> which you can use a web browser to view the content.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="518" src="https://www.osradar.com/wp-content/uploads/2021/07/2-1-1024x518.png" alt="2.- Play Framework on Debian 10" class="wp-image-31123" srcset="https://www.osradar.com/wp-content/uploads/2021/07/2-1-1024x518.png 1024w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-300x152.png 300w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-768x388.png 768w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-696x352.png 696w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-1068x540.png 1068w, https://www.osradar.com/wp-content/uploads/2021/07/2-1.png 1349w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Play Framework on Debian 10</figcaption></figure>



<p class="has-line-data">Now if you are doing this installation on a remote server, then you will get an error. This is because the host has not been authorized.</p>



<p class="has-line-data">Finish running Play and edit the configuration file:</p>



<pre class="wp-block-preformatted">nano /home/user/play-samples/play-scala-hello-world-tutorial/conf/application.conf</pre>



<p class="has-line-data">And add the following:</p>



<pre class="wp-block-preformatted">play.filters.hosts {
  allowed = ["."]
}</pre>



<p class="has-line-data">Save the changes and close the editor so that when you start the framework again, it will be accessible.</p>



<h2 class="code-line"><a id="Creating_a_new_application_with_Play_Framework_on_Debian_10_84"></a>Creating a new application with Play Framework on Debian 10</h2>



<p class="has-line-data">First, create a folder for the new project. In my case I will call it <code>example</code> but you can call it whatever you want. Then access it.</p>



<pre class="wp-block-preformatted">mkdir ~/example
cd ~/example</pre>



<p class="has-line-data">And from there, you can download the template for java application development:</p>



<pre class="wp-block-preformatted">sbt new playframework/play-java-seed.g8</pre>



<p class="has-line-data">Now, access the generated folder and run it:</p>



<pre class="wp-block-preformatted">cd example
run</pre>



<p class="has-line-data">Stop it and start working on it.</p>



<h2 class="code-line"><a id="Conclusion_102"></a>Conclusion</h2>



<p class="has-line-data">In this post, you learned about the existence of a very interesting framework for the web like Play Framework. Besides this you are now able to install it on Debian 10.</p>



<p class="has-line-data">Enjoy it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-play-framework-debian-10/">Install Play framework on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-play-framework-debian-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to clean all MIUI Bloatware with Xiaomi ADB Tools</title>
		<link>https://www.osradar.com/how-to-clean-all-miui-bloatware-with-xiaomi-adb-tools/</link>
					<comments>https://www.osradar.com/how-to-clean-all-miui-bloatware-with-xiaomi-adb-tools/#respond</comments>
		
		<dc:creator><![CDATA[vazquez]]></dc:creator>
		<pubDate>Sun, 18 Apr 2021 02:56:00 +0000</pubDate>
				<category><![CDATA[Mobiles]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Xiaomi]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=29552</guid>

					<description><![CDATA[<p>Hello dear friends, it is no secret that Xiaomi phones despite their excellent value for money, come with many pre-installed apps, advertising, bloatware. Factors that affect negatively the user experience. So many applications and services that we do not get to use, make the battery drain faster. That&#8217;s why in this post we will show [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-clean-all-miui-bloatware-with-xiaomi-adb-tools/">How to clean all MIUI Bloatware with Xiaomi ADB Tools</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello dear friends, it is no secret that <a href="https://www.osradar.com/?s=Xiaomi" target="_blank" rel="noreferrer noopener">Xiaomi </a>phones despite their excellent value for money, come with many pre-installed apps, advertising, bloatware. Factors that affect negatively the user experience. So many applications and services that we do not get to use, make the battery drain faster. That&#8217;s why in this post we will show you how to clean all MIUI bloatware with Xiaomi ADB Tools. A fairly intuitive tool that will allow you to remove these apps and unneeded services that take up much space on your phone.<strong> Xiaomi ADB Tools is a tool that takes advantage of ADB privileges to wipe a good part of the services and apps that your Xiaomi phone comes with</strong>. When you use the tool you will realize that the bloatware is very high.</p>



<h2>First step</h2>



<p>Download and install<a href="https://www.oracle.com/java/technologies/javase-downloads.html" target="_blank" rel="noreferrer noopener"> Oracle Java for Windows, macOS, or Linux</a>, depending on your operating system.</p>



<h2>Second step</h2>



<p>Once you have installed Java, download the tool which is a .jar executable file by following the link below:</p>



<p><a href="https://github.com/Szaki/XiaomiADBFastbootTools/releases/tag/7.0.3" target="_blank" rel="noreferrer noopener">Xiaomi ADB Tools</a></p>



<h2>Third step</h2>



<p>After that, enable USB debugging on your phone by following the steps below:</p>



<ul><li>Open the settings of your phone</li><li>Go to About phone</li><li>Click seven times on MIUI version</li><li>Now go to &#8220;additional settings&#8221;, where you will find the developer options</li><li>Enable USB debugging</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" width="473" height="1024" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/04/Cm01-473x1024.jpg" alt="Enable USB debugging clean" class="wp-image-29571" srcset="https://www.osradar.com/wp-content/uploads/2021/04/Cm01-473x1024.jpg 473w, https://www.osradar.com/wp-content/uploads/2021/04/Cm01-138x300.jpg 138w, https://www.osradar.com/wp-content/uploads/2021/04/Cm01-768x1664.jpg 768w, https://www.osradar.com/wp-content/uploads/2021/04/Cm01-709x1536.jpg 709w, https://www.osradar.com/wp-content/uploads/2021/04/Cm01-945x2048.jpg 945w, https://www.osradar.com/wp-content/uploads/2021/04/Cm01-696x1508.jpg 696w, https://www.osradar.com/wp-content/uploads/2021/04/Cm01-1068x2314.jpg 1068w, https://www.osradar.com/wp-content/uploads/2021/04/Cm01.jpg 1080w" sizes="(max-width: 473px) 100vw, 473px" /><figcaption>Enable USB debugging</figcaption></figure>



<h2>Fourth step</h2>



<p>Then connect your phone to your PC and <em>allow USB debugging permissions</em>. After it has successfully connected, you will see a list of apps and services that can be uninstalled. Remember that you can delete apps without fear, as all selectable apps in the tool are not necessary for the proper functioning of the phone.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="473" height="1024" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/04/Cm02-473x1024.jpg" alt=" allow USB debugging permissions clean" class="wp-image-29572" srcset="https://www.osradar.com/wp-content/uploads/2021/04/Cm02-473x1024.jpg 473w, https://www.osradar.com/wp-content/uploads/2021/04/Cm02-138x300.jpg 138w, https://www.osradar.com/wp-content/uploads/2021/04/Cm02-768x1664.jpg 768w, https://www.osradar.com/wp-content/uploads/2021/04/Cm02-709x1536.jpg 709w, https://www.osradar.com/wp-content/uploads/2021/04/Cm02-945x2048.jpg 945w, https://www.osradar.com/wp-content/uploads/2021/04/Cm02-696x1508.jpg 696w, https://www.osradar.com/wp-content/uploads/2021/04/Cm02-1068x2314.jpg 1068w, https://www.osradar.com/wp-content/uploads/2021/04/Cm02.jpg 1080w" sizes="(max-width: 473px) 100vw, 473px" /><figcaption> allow USB debugging permissions</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="694" height="438" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/04/Cm03.png" alt="Xiaomi ADB Tools" class="wp-image-29573" srcset="https://www.osradar.com/wp-content/uploads/2021/04/Cm03.png 694w, https://www.osradar.com/wp-content/uploads/2021/04/Cm03-300x189.png 300w" sizes="(max-width: 694px) 100vw, 694px" /><figcaption>Xiaomi ADB Tools</figcaption></figure>



<h2>Fifth step</h2>



<p>Finally, select the apps you want to uninstall and press the <em>Uninstall! </em>button. Also in case you want you can easily reinstall them using the Reinstaller section.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="694" height="438" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2021/04/Cm04.png" alt="Clean MIUI" class="wp-image-29574" srcset="https://www.osradar.com/wp-content/uploads/2021/04/Cm04.png 694w, https://www.osradar.com/wp-content/uploads/2021/04/Cm04-300x189.png 300w" sizes="(max-width: 694px) 100vw, 694px" /><figcaption>Clean MIUI</figcaption></figure>



<h2>Conclusion</h2>



<p>Xiaomi phones are excellent, yet you can always improve their performance without going to the extreme of installing a Custom Rom (practically replace the entire operating system). An alternative to optimize them is Xiaomi ADB Tools with a simple and secure interface, you can free up space and gain smoothness. Thanks for reading us. Bye!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-clean-all-miui-bloatware-with-xiaomi-adb-tools/">How to clean all MIUI Bloatware with Xiaomi ADB Tools</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-clean-all-miui-bloatware-with-xiaomi-adb-tools/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Oracle Java 16 on Debian 10</title>
		<link>https://www.osradar.com/install-java-16-debian-10/</link>
					<comments>https://www.osradar.com/install-java-16-debian-10/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sat, 20 Mar 2021 02:10:00 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=27457</guid>

					<description><![CDATA[<p>Hello, friends. We know that Java is one of the most popular programming languages and now it’s version 16. So in this post, you’ll learn how to install Oracle Java 16on Debian 10 Java&#160;is one of the preferred languages by many developers but it is also necessary to run other very important software. In this sense, Oracle [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-java-16-debian-10/">How to install Oracle Java 16 on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello, friends. We know that Java is one of the most popular programming languages and now <a href="https://openjdk.java.net/projects/jdk/16/" target="_blank" rel="noreferrer noopener">it’s version 16</a>. So in this post, you’ll learn <strong>how to install Oracle Java 16on Debian 10</strong></p>



<p><a href="https://www.osradar.com/tag/java" target="_blank" rel="noreferrer noopener">Java</a>&nbsp;is one of the preferred languages by many developers but it is also necessary to run other very important software. In this sense, Oracle from time to time releases a new version that includes good news.</p>



<p>So, if you are a developer and want to try Java 16 on Debian 10, this post will help you with that.</p>



<h2>Install Oracle Java 16 on Debian 10</h2>



<p>There is a package created by Linux Uprising that facilitates the whole process. This package is originally created for Ubuntu but we can also use it in Debian.</p>



<p>In a very brief way, the package is an installer that takes care of downloading the Oracle binaries. Also, it extracts them and copies them in the appropriate directory and everything by us.</p>



<p>So, open a terminal or log in with SSH and update the distribution</p>



<pre class="wp-block-preformatted">sudo apt update<br>sudo apt upgrade</pre>



<p>Then, download the package that will help us with the installation:</p>



<pre class="wp-block-preformatted">wget -c https://launchpad.net/~linuxuprising/+archive/ubuntu/java/+files/oracle-java16-installer_16-1~linuxuprising0_amd64.deb -O java.deb
--2021-03-17 23:36:18--  https://launchpad.net/~linuxuprising/+archive/ubuntu/java/+files/oracle-java16-installer_16-1~linuxuprising0_amd64.deb
 Resolving launchpad.net (launchpad.net)… 2001:67c:1560:8003::8004, 2001:67c:1560:8003::8003, 91.189.89.223, …
 Connecting to launchpad.net (launchpad.net)|2001:67c:1560:8003::8004|:443… connected.
 HTTP request sent, awaiting response… 303 See Other
 Location: https://launchpadlibrarian.net/528398753/oracle-java16-installer_16-1~linuxuprising0_amd64.deb [following]
 --2021-03-17 23:36:19--  https://launchpadlibrarian.net/528398753/oracle-java16-installer_16-1~linuxuprising0_amd64.deb
 Resolving launchpadlibrarian.net (launchpadlibrarian.net)… 2001:67c:1560:8003::8008, 2001:67c:1560:8003::8007, 91.189.89.229, …
 Connecting to launchpadlibrarian.net (launchpadlibrarian.net)|2001:67c:1560:8003::8008|:443… connected.
 HTTP request sent, awaiting response… 200 OK
 Length: 33962 (33K) [application/x-debian-package]
 Saving to: ‘java.deb’
 java.deb                                   100%[=====================================================================================>]  33.17K  --.-KB/s    in 0.02s   
 2021-03-17 23:36:19 (1.50 MB/s) - ‘java.deb’ saved [33962/33962]</pre>



<p>When the download is complete, it must be run or installed:</p>



<pre class="wp-block-preformatted">sudo apt install ./java.deb
Reading package lists… Done
 Building dependency tree       
 Reading state information… Done
 Note, selecting 'oracle-java16-installer' instead of './java.deb'
 The following additional packages will be installed:
   binutils binutils-common binutils-x86-64-linux-gnu java-common libbinutils
 Suggested packages:
   binutils-doc binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho | ttf-sazanami-mincho
   ttf-arphic-uming firefox | firefox-2 | iceweasel | mozilla-firefox | iceape-browser | mozilla-browser | epiphany-gecko | epiphany-webkit | epiphany-browser | galeon
   | midbrowser | moblin-web-browser | xulrunner | xulrunner-1.9 | konqueror | chromium-browser | midori | google-chrome
 Recommended packages:
   gsfonts-x11 oracle-java16-set-default
 The following NEW packages will be installed:
   binutils binutils-common binutils-x86-64-linux-gnu java-common libbinutils oracle-java16-installer
 0 upgraded, 6 newly installed, 0 to remove and 5 not upgraded.
 Need to get 4,446 kB/4,480 kB of archives.
 After this operation, 28.4 MB of additional disk space will be used.
 Do you want to continue? [Y/n]</pre>



<p>And there the whole process will begin</p>



<p>First, accept the license terms:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="505" src="https://www.osradar.com/wp-content/uploads/2021/01/1-15-1024x505.png" alt="1.- License terms" class="wp-image-29183" srcset="https://www.osradar.com/wp-content/uploads/2021/01/1-15-1024x505.png 1024w, https://www.osradar.com/wp-content/uploads/2021/01/1-15-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2021/01/1-15-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2021/01/1-15-696x343.png 696w, https://www.osradar.com/wp-content/uploads/2021/01/1-15-1068x527.png 1068w, https://www.osradar.com/wp-content/uploads/2021/01/1-15.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- License terms</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="468" src="https://www.osradar.com/wp-content/uploads/2021/01/2-15-1024x468.png" alt="2.- Accept the license terms" class="wp-image-29184" srcset="https://www.osradar.com/wp-content/uploads/2021/01/2-15-1024x468.png 1024w, https://www.osradar.com/wp-content/uploads/2021/01/2-15-300x137.png 300w, https://www.osradar.com/wp-content/uploads/2021/01/2-15-768x351.png 768w, https://www.osradar.com/wp-content/uploads/2021/01/2-15-696x318.png 696w, https://www.osradar.com/wp-content/uploads/2021/01/2-15-1068x488.png 1068w, https://www.osradar.com/wp-content/uploads/2021/01/2-15.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Accept the license terms</figcaption></figure>



<p>And then the process will continue. In the end, you will see an output like the following</p>



<p>Now to make this version of Java the default you have to download another package:</p>



<pre class="wp-block-preformatted">wget https://launchpad.net/~linuxuprising/+archive/ubuntu/java/+files/oracle-java16-set-default_16-1~linuxuprising0_all.deb -O default.deb</pre>



<p>And install it:</p>



<pre class="wp-block-preformatted">sudo apt install ./default.deb</pre>



<p>Now yes, check the Java version of the system to see if everything went well:</p>



<pre class="wp-block-preformatted">java --version</pre>



<p>Output:</p>



<pre class="wp-block-preformatted">java 16 2021-03-16
 Java(TM) SE Runtime Environment (build 16+36-2231)
 Java HotSpot(TM) 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)</pre>



<p>So, enjoy it.</p>



<h2>Conclusion</h2>



<p>Java 16 has been released with many new features and this makes many want to leap an old version to this one. Therefore, in this post, you could learn how to install it in Ubuntu.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-java-16-debian-10/">How to install Oracle Java 16 on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-java-16-debian-10/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Apache Tomcat on Ubuntu 20.04 / Debian 10?</title>
		<link>https://www.osradar.com/install-apache-tomcat-ubuntu-debian/</link>
					<comments>https://www.osradar.com/install-apache-tomcat-ubuntu-debian/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 29 Oct 2020 02:39:00 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Tomcat]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12786</guid>

					<description><![CDATA[<p>Even though Python is the most popular programming language actually, there is still confidence in Java. So you probably needed to make applications with this veteran language. Especially in the web environment that there are so many good languages and tools, Java still resists. So, to deploy web applications made in Java is Tomcat. With [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-tomcat-ubuntu-debian/">How to install Apache Tomcat on Ubuntu 20.04 / Debian 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Even though Python is the most popular programming language actually, there is still confidence in Java. So you probably needed to make applications with this veteran language. Especially in the web environment that there are so many good languages and tools, Java still resists. So, to deploy web applications made in Java is Tomcat. With the main objective that you learn how to install Apache Tomcat on Ubuntu 20.04 / Debian 10 is that this post has been written. Let us get started.</p>
<h2>Apache Tomcat</h2>
<p><a href="https://www.osradar.com/tag/java/" rel="noopener">Java</a> and its multipurpose language and that make it so good and useful to learn. Well, after coding your web application, it gets to the point where you have to deploy it. To do this, it requires a server that can interpret that Java code. Remember that we are talking about web applications. And to deploy and serve it, nothing like <a href="https://tomcat.apache.org/" rel="noopener">Apache Tomcat</a>.</p>
<p>Estricatemente speaking Tomcat is not a server but transforms the caught JPS into servlets that can serve the application in question.</p>
<p>On the other hand, Apache Tomcat is open source and can be installed on any system running Java.</p>
<h2>Install Apache Tomcat on Ubuntu 20.04 / Debian 10</h2>
<h3>1) Install and configure Java on Ubuntu 20.04 / Debian 10</h3>
<p>Apache Tomcat is an application made with Java. Therefore, the first step is to install Java on <a href="https://www.osradar.com/tag/buster/" rel="noopener">Debian 10</a>.</p>
<p>Open a terminal session and run the following:</p>
<pre>:~$ sudo apt install default-jre default-jdk</pre>
<p>Then, check the java version.</p>
<pre>:~$ java --version
openjdk 11.0.3 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-post-Debian-5)
OpenJDK 64-Bit Server VM (build 11.0.3+7-post-Debian-5, mixed mode, sharing)</pre>
<p>As you can see, Java version 11 has been installed. It is one of the most recent and with very good support.</p>
<p>Now, you have to modify the<code> /etc/environment</code> file and add the Java path.</p>
<pre>:~$ sudo nano /etc/environment</pre>
<p>And add the following:</p>
<pre class="">JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/"</pre>
<p>Save the changes and close the file.</p>
<p>The next step is to edit the .bashrc file and add the following:</p>
<pre>:~$ sudo nano .bashrc</pre>
<pre class="">export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/"
export PATH=$JAVA_HOME/bin:$PATH</pre>
<figure id="attachment_12801" aria-describedby="caption-attachment-12801" style="width: 560px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12801" src="https://www.osradar.com/wp-content/uploads/2019/07/1-5.jpeg" alt="1.- Editing the bash profile" width="560" height="272" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-5.jpeg 560w, https://www.osradar.com/wp-content/uploads/2019/07/1-5-300x146.jpeg 300w" sizes="(max-width: 560px) 100vw, 560px" /><figcaption id="caption-attachment-12801" class="wp-caption-text">1.- Editing the bash profile</figcaption></figure>
<p>Again, save the changes and close the file.</p>
<p>Next, refresh the bash.</p>
<pre>:~$ source .bashrc</pre>
<p>Now, type this command to test the Java path.</p>
<pre>:~$ echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64/bin/java</pre>
<p>So, if you got the Java path from your computer, everything is correct.</p>
<h3>2) Install Apache Tomcat on Ubunut 20.04 / Debian 10</h3>
<p>For security reasons, it is convenient to create a new user for Tomcat. Also, add it to a group called tomcat.</p>
<pre>:~$ sudo -i
:~# groupadd tomcat
:~# useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat</pre>
<figure id="attachment_12802" aria-describedby="caption-attachment-12802" style="width: 562px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12802" src="https://www.osradar.com/wp-content/uploads/2019/07/2-4.jpeg" alt="2.- Creating a new user for apache" width="562" height="198" srcset="https://www.osradar.com/wp-content/uploads/2019/07/2-4.jpeg 562w, https://www.osradar.com/wp-content/uploads/2019/07/2-4-300x106.jpeg 300w" sizes="(max-width: 562px) 100vw, 562px" /><figcaption id="caption-attachment-12802" class="wp-caption-text">2.- Creating a new user for apache</figcaption></figure>
<p>Now we can install Apache Tomcat. To do this, go to the<code> /opt</code>/ folder and download with <code>wget</code>.</p>
<pre>:~# cd /opt/
:~# wget -c https://downloads.apache.org/tomcat/tomcat-9/v9.0.39/bin/apache-tomcat-9.0.39.tar.gz<br />--2020-10-28 19:23:24-- https://downloads.apache.org/tomcat/tomcat-9/v9.0.39/bin/apache-tomcat-9.0.39.tar.gz<br />Resolving downloads.apache.org (downloads.apache.org)... 88.99.95.219, 2a01:4f8:10a:201a::2<br />Connecting to downloads.apache.org (downloads.apache.org)|88.99.95.219|:443... connected.<br />HTTP request sent, awaiting response... 200 OK<br />Length: 11282879 (11M) [application/x-gzip]<br />Saving to: ‘apache-tomcat-9.0.39.tar.gz’<br />apache-tomcat-9.0.39.tar.gz 100%[=====================================================================================&gt;] 10.76M 157KB/s in 1m 49s<br />2020-10-28 19:25:15 (101 KB/s) - ‘apache-tomcat-9.0.39.tar.gz’ saved [11282879/11282879]</pre>
<p>Then, decompress it and rename the folder.</p>
<pre>:~# tar -xzvf apache-tomcat-9.0.39.tar.gz
:~# mv apache-tomcat-9.0.39 tomcat</pre>
<p>After that, you need to change the owner of the folder and assign the required permissions so that it can run smoothly. Remember that now, we are using the root user.</p>
<pre class="">:~# chown -R tomcat:tomcat /opt/tomcat/
:~# chmod +x /opt/tomcat/bin/*</pre>
<p>Now, on the .bashrc file add the CATALINA_HOME path.</p>
<pre>:~# nano ~/.bashrc
export CATALINA_HOME=/opt/tomcat</pre>
<p>Save the changes and close the file.</p>
<p>Then, refresh bash.</p>
<pre>:~# source ~/.bashrc</pre>
<p>After that, we can run Apache Tomcat. To do it, just type this command:</p>
<pre>:~# /opt/tomcat/bin/startup.sh</pre>
<figure id="attachment_12804" aria-describedby="caption-attachment-12804" style="width: 641px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12804" src="https://www.osradar.com/wp-content/uploads/2019/07/4-1.jpeg" alt="4.- Tomcat is running" width="641" height="194" srcset="https://www.osradar.com/wp-content/uploads/2019/07/4-1.jpeg 641w, https://www.osradar.com/wp-content/uploads/2019/07/4-1-300x91.jpeg 300w" sizes="(max-width: 641px) 100vw, 641px" /><figcaption id="caption-attachment-12804" class="wp-caption-text">4.- Tomcat is running</figcaption></figure>
<p>Next, open your web browser ad go <code>http://your-server:8080</code>. And you will see this.</p>
<figure id="attachment_24865" aria-describedby="caption-attachment-24865" style="width: 1354px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-24865 size-full" src="https://www.osradar.com/wp-content/uploads/2019/07/tomcat.png" alt="5.- Apache Tomcat on Ubuntu 20.04 / Debian 10" width="1354" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/07/tomcat.png 1354w, https://www.osradar.com/wp-content/uploads/2019/07/tomcat-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/tomcat-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/tomcat-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/tomcat-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/tomcat-1068x528.png 1068w" sizes="(max-width: 1354px) 100vw, 1354px" /><figcaption id="caption-attachment-24865" class="wp-caption-text">5.- Apache Tomcat on Ubuntu 20.04 / Debian 10</figcaption></figure>
<p>If you want to set a password to improve security of the manager web app. So, open the <code>tomcat-users.xml</code></p>
<pre>:~# nano /opt/tomcat/conf/tomcat-users.xml</pre>
<p>In the <code>tomcat-user</code> section, you have to add the username and password.</p>
<pre class="">&lt;role rolename="manager-gui"/&gt;
&lt;user username="XXXXXX" password="XXXXXXX" roles="manager-gui,admin-gui"/&gt;</pre>
<figure id="attachment_12807" aria-describedby="caption-attachment-12807" style="width: 761px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12807" src="https://www.osradar.com/wp-content/uploads/2019/07/6-1.jpeg" alt="6.- Change the username and password" width="761" height="373" srcset="https://www.osradar.com/wp-content/uploads/2019/07/6-1.jpeg 761w, https://www.osradar.com/wp-content/uploads/2019/07/6-1-300x147.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/6-1-324x160.jpeg 324w, https://www.osradar.com/wp-content/uploads/2019/07/6-1-533x261.jpeg 533w, https://www.osradar.com/wp-content/uploads/2019/07/6-1-696x341.jpeg 696w" sizes="(max-width: 761px) 100vw, 761px" /><figcaption id="caption-attachment-12807" class="wp-caption-text">6.- Change the username and password</figcaption></figure>
<p>Of course, replace the password for yours.</p>
<p>Then, restart Tomcat.</p>
<pre class="">:~# ./shutdown.sh
:~# ./startup.sh</pre>
<p>And go to the web browser again. Next, refresh the page. And that is it.</p>
<h2>Conclusion</h2>
<p>Apache Tomcat is the best solution to deploy and serve web applications made with Java. So if you program in Java, you should learn how to manipulate Tomcat. As you have learned in this post, it is not very complex to learn how to install it in  Ubuntu 20.04 / Debian 10.</p>
<p>Please share this post with your friends and join <a href="http://t.me/osradar" target="_blank" rel="noopener noreferrer">our Telegram channel</a>.</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-apache-tomcat-ubuntu-debian/">How to install Apache Tomcat on Ubuntu 20.04 / Debian 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-apache-tomcat-ubuntu-debian/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Java 15 on CentOS 8 / CentOS 7</title>
		<link>https://www.osradar.com/how-to-install-java-15-on-centos-8-centos-7/</link>
					<comments>https://www.osradar.com/how-to-install-java-15-on-centos-8-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 24 Sep 2020 04:20:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[New version]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=23717</guid>

					<description><![CDATA[<p>Recently Java 15 has been released with interesting new features in the accounting field and introducing many security patches. In spite of this, it can now be installed in Linux either as compiled packages or by downloading the binaries. Well, in this post, I will show you how to install Java 15 on CentOS 8 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-java-15-on-centos-8-centos-7/">How to install Java 15 on CentOS 8 / CentOS 7</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a href="https://jdk.java.net/15/release-notes" target="_blank" rel="noreferrer noopener">Recently Java 15 has been released</a> with interesting new features in the accounting field and introducing many security patches. In spite of this, it can now be installed in Linux either as compiled packages or by downloading the binaries. Well, in this post, I will show you how to install Java 15 on CentOS 8 / CentOS 7</p>



<p>One of the biggest strengths of CentOS is that it has a wide range of packages and programs that can be installed. On the other hand, the CentOS project has many communities and official repositories that extend even more the functionality of the distribution.</p>



<h2>OpenJDK or Oracle Java</h2>



<p><strong>Since Java version 11, the license has changed and become a little more restrictive for commercial purposes</strong>. However, OpenJDK continues to run alongside the commercial version that includes professional support.</p>



<p>The above situation opens a small controversy about which implementation to use. And the answer depends on each developer however, with OpenJDK you will not have license problems and is ideal for testing features and educational projects.</p>



<p><strong>Well, for this tutorial I will choose OpenJDK. Do not worry it is Java but open source.</strong></p>



<p>Let’s go for it.</p>



<h2>Install Java 15 on CentOS 8 / Centos 7</h2>



<p>Java 15 is available as an RPM package from the Oracle website. So you can go to the download section and download the RPM package corresponding to your processor architecture.</p>



<p>However, using the terminal and wget command is faster and even easier.</p>



<p>So, open the terminal or start an <a href="https://www.osradar.com/termius-is-a-powefull-ssh-client/" target="_blank" rel="noreferrer noopener">SSH session</a> and type the following command.</p>



<pre class="wp-block-preformatted">wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/15+36/779bf45e88a44cbd9ea6621d33e33db1/jdk-15_linux-x64_bin.rpm</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="416" src="https://www.osradar.com/wp-content/uploads/2020/09/1-5-1024x416.png" alt="1.- Download Java 15 on CentOS 8" class="wp-image-23718" srcset="https://www.osradar.com/wp-content/uploads/2020/09/1-5-1024x416.png 1024w, https://www.osradar.com/wp-content/uploads/2020/09/1-5-300x122.png 300w, https://www.osradar.com/wp-content/uploads/2020/09/1-5-768x312.png 768w, https://www.osradar.com/wp-content/uploads/2020/09/1-5-696x282.png 696w, https://www.osradar.com/wp-content/uploads/2020/09/1-5-1068x433.png 1068w, https://www.osradar.com/wp-content/uploads/2020/09/1-5.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Download Java 15 on CentOS 8</figcaption></figure>



<p>And it will automatically start the download.</p>



<p>You can then install the package locally with DNF.</p>



<pre class="wp-block-preformatted">sudo dnf localinstall jdk-15_linux-x64_bin.rpm
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:01:51 ago on Wed Sep 23 11:22:58 2020.
Dependencies resolved.
Package Architecture Version Repository Size
Installing:
jdk-15 x86_64 2000:15-ga @commandline 162 M
Transaction Summary
Install 1 Package
Total size: 162 M
Installed size: 314 M
Is this ok [y/N]</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="256" src="https://www.osradar.com/wp-content/uploads/2020/09/2-5-1024x256.png" alt="2.- Installing Java 15 on CentOS 8" class="wp-image-23719" srcset="https://www.osradar.com/wp-content/uploads/2020/09/2-5-1024x256.png 1024w, https://www.osradar.com/wp-content/uploads/2020/09/2-5-300x75.png 300w, https://www.osradar.com/wp-content/uploads/2020/09/2-5-768x192.png 768w, https://www.osradar.com/wp-content/uploads/2020/09/2-5-696x174.png 696w, https://www.osradar.com/wp-content/uploads/2020/09/2-5-1068x267.png 1068w, https://www.osradar.com/wp-content/uploads/2020/09/2-5.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Installing Java 15 on CentOS 8</figcaption></figure>



<p>Once the installation is complete, if you have several versions of Java you can choose the default by running the following command:</p>



<pre class="wp-block-preformatted">sudo alternatives --config java
There is 1 program that provides 'java'.
Selection Command
*+ 1 /usr/java/jdk-15/bin/java
Enter to keep the current selection[+], or type selection number:</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="741" height="210" src="https://www.osradar.com/wp-content/uploads/2020/09/3-1.png" alt="3.- Set the default Java version" class="wp-image-23720" srcset="https://www.osradar.com/wp-content/uploads/2020/09/3-1.png 741w, https://www.osradar.com/wp-content/uploads/2020/09/3-1-300x85.png 300w, https://www.osradar.com/wp-content/uploads/2020/09/3-1-696x197.png 696w" sizes="(max-width: 741px) 100vw, 741px" /><figcaption>3.- Set the default Java version</figcaption></figure>



<p>Although in my case I only have this installation.</p>



<p>Finally, check the JAva version to see if the command works correctly:</p>



<pre class="wp-block-preformatted">java --version
java version "15" 2020-09-15
Java(TM) SE Runtime Environment (build 15+36-1562)
Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="821" height="165" src="https://www.osradar.com/wp-content/uploads/2020/09/4.png" alt="4.- Java Version" class="wp-image-23721" srcset="https://www.osradar.com/wp-content/uploads/2020/09/4.png 821w, https://www.osradar.com/wp-content/uploads/2020/09/4-300x60.png 300w, https://www.osradar.com/wp-content/uploads/2020/09/4-768x154.png 768w, https://www.osradar.com/wp-content/uploads/2020/09/4-696x140.png 696w" sizes="(max-width: 821px) 100vw, 821px" /><figcaption>4.- Java Version</figcaption></figure>



<p>So, enjoy it.</p>



<h2>Conclusion</h2>



<p>Java is an old rocker who has a lot to contribute. So it is not surprising that he is a valued Oracle and has very active development. Now with version 15, you can enjoy attractive new features.</p>



<p>So, enjoy it. Share this post and join <a href="https://t.me/osradar" target="_blank" rel="noreferrer noopener">our Telegram Channel.</a></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-java-15-on-centos-8-centos-7/">How to install Java 15 on CentOS 8 / CentOS 7</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-java-15-on-centos-8-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Java 15 on OpenSUSE 15.2?</title>
		<link>https://www.osradar.com/install-java-15-opensuse-15-2/</link>
					<comments>https://www.osradar.com/install-java-15-opensuse-15-2/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 23 Sep 2020 05:11:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java 14]]></category>
		<category><![CDATA[New version]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=19201</guid>

					<description><![CDATA[<p>Recently Java 15 has been released with interesting new features in the accounting field and introducing many security patches. In spite of this, it can now be installed in Linux either as compiled packages or by downloading the binaries. Well, in this post, I will show you how to install Java 15 on OpenSUSE 15.2 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-java-15-opensuse-15-2/">How to install Java 15 on OpenSUSE 15.2?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a href="https://jdk.java.net/15/release-notes" target="_blank" rel="noreferrer noopener">Recently Java 15 has been released</a> with interesting new features in the accounting field and introducing many security patches. In spite of this, it can now be installed in Linux either as compiled packages or by downloading the binaries. Well, in this post, I will show you how to install Java 15 on OpenSUSE 15.2 / 15.1.</p>



<p>One of the biggest strengths of OpenSUSE is that it has a wide range of packages and programs that can be installed. On the other hand, the OpenSUSE project has many community and official repositories that extend even more the functionality of the distribution.</p>



<h2>OpenJDK or Oracle Java</h2>



<p><strong>Since Java version 11, the license has changed and become a little more restrictive for commercial purposes</strong>. However, OpenJDK continues to run alongside the commercial version that includes professional support.</p>



<p>The above situation opens a small controversy about which implementation to use. And the answer depends on each developer however, with OpenJDK you will not have license problems and is ideal for testing features and educational projects.</p>



<p><strong>Well, for this tutorial I will choose OpenJDK. Do not worry it is Java but open source.</strong></p>



<p>Let&#8217;s go for it.</p>



<h2>Install Java 15 on OpenSUSE 15.2</h2>



<p>Once you have a terminal session open, it is necessary to completely upgrade your system. To do this, run the following command:</p>



<pre class="wp-block-preformatted">:~$ sudo zypper up</pre>



<p>Once the system upgrade is complete, we can continue.</p>



<p><a aria-label="Java (opens in a new tab)" rel="noreferrer noopener" href="https://www.osradar.com/tag/java" target="_blank">Java</a> 15 packages can be found in an OpenSUSE factory repository. This repository has proven to be quite stable and we will be able to use it without problems.</p>



<p>So to add this repository run it:</p>



<pre class="wp-block-preformatted">:~$ sudo zypper ar http://download.opensuse.org/repositories/Java:/Factory/openSUSE_Leap_15.2/ java</pre>



<p>Now that the repository has been added, it needs to be reprioritized so that it does not get into trouble with the rest:</p>



<pre class="wp-block-preformatted">:~$ sudo zypper mr -p 70 java
Repository 'java' priority has been set to 70.</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="700" height="107" src="https://www.osradar.com/wp-content/uploads/2020/03/2-18.png" alt="2.- Set a new priority for the repository" class="wp-image-19205" srcset="https://www.osradar.com/wp-content/uploads/2020/03/2-18.png 700w, https://www.osradar.com/wp-content/uploads/2020/03/2-18-300x46.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/2-18-696x107.png 696w" sizes="(max-width: 700px) 100vw, 700px" /><figcaption>Set a new priority for the repository</figcaption></figure>



<p>Then, refresh all the repositories to load the newly added one. When you first use this repository, you will be asked to accept the GPG key for it.</p>



<pre class="wp-block-preformatted">:~$ sudo zypper refresh
Retrieving repository 'java' metadata --------------------------------------------------------------------------------------------------------------------------------[|]
 New repository or package signing key received:
 Repository:       java                                        
   Key Name:         Java OBS Project Java@build.opensuse.org  
   Key Fingerprint:  97119219 72E27C87 BBC1BA89 E38C29BC 4276E0B9
   Key Created:      Mon 18 Jun 2018 09:42:22 AM -04             
   Key Expires:      Wed 26 Aug 2020 09:42:22 AM -04             
   Rpm Name:         gpg-pubkey-4276e0b9-5b27b6be                
 Do you want to reject the key, trust temporarily, or trust always? r/t/a/?: a
 Retrieving repository 'java' metadata ……………………………………………………………………………………………………………..[done]
 Building repository 'java' cache ………………………………………………………………………………………………………………….[done]
 Repository 'Non-OSS Repository' is up to date.                                                                                                                           
 Repository 'Main Repository' is up to date.                                                                                                                              
 Retrieving repository 'Main Update Repository' metadata ……………………………………………………………………………………………..[done]
 Building repository 'Main Update Repository' cache ………………………………………………………………………………………………….[done]
 Retrieving repository 'Update Repository (Non-Oss)' metadata …………………………………………………………………………………………[done]
 Building repository 'Update Repository (Non-Oss)' cache ……………………………………………………………………………………………..[done]
 All repositories have been refreshed.</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="323" src="https://www.osradar.com/wp-content/uploads/2020/03/3-18-1024x323.png" alt="3.- Refresh all system repositories" class="wp-image-19206" srcset="https://www.osradar.com/wp-content/uploads/2020/03/3-18-1024x323.png 1024w, https://www.osradar.com/wp-content/uploads/2020/03/3-18-300x95.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/3-18-768x242.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/3-18-696x219.png 696w, https://www.osradar.com/wp-content/uploads/2020/03/3-18-1068x336.png 1068w, https://www.osradar.com/wp-content/uploads/2020/03/3-18-1333x420.png 1333w, https://www.osradar.com/wp-content/uploads/2020/03/3-18.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>3.- Refresh all system repositories</figcaption></figure>



<p>Now, you can install Java 15 on OpenSUSE 15.2</p>



<pre class="wp-block-preformatted">:~$ sudo zypper in java-15-openjdk
</pre>



<p>Finally, check the installed version</p>



<pre class="wp-block-preformatted">:~$ java --version
openjdk 15-internal 2020-09-15
OpenJDK Runtime Environment (build 15-internal+33-suse-lp152.14.15-x8664)
OpenJDK 64-Bit Server VM (build 15-internal+33-suse-lp152.14.15-x8664, mixed mode)</pre>



<p>So, enjoy it.</p>



<h2>Conclusion</h2>



<p>Java 15 is an improved version of a great programming language. This makes many developers attentive to its evolution with a view to a new LTS version. Now you know how to install it in OpenSUSE 15.2 which is a distribution quite focused on newcomers but also professional developers. So, you know how to install Java 15 on OpenSUSE 15.2</p>



<p>Please share this post and join <a aria-label="our Telegram channel (opens in a new tab)" rel="noreferrer noopener" href="https://www.t.me/osradar" target="_blank">our Telegram channel</a>.</p>



<p>Thanks for reading the post.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-java-15-opensuse-15-2/">How to install Java 15 on OpenSUSE 15.2?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-java-15-opensuse-15-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Gradle on Ubuntu 20.04?</title>
		<link>https://www.osradar.com/how-to-install-gradle-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/how-to-install-gradle-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Mon, 03 Aug 2020 22:40:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[focal]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=22293</guid>

					<description><![CDATA[<p>Hi, folks. In this post dedicated to Java, you will learn how to install Gradle on Ubuntu 20.04 Gradle is an open-source build automation tool used for Java, Groovy, and Scala development. Basically, it builds upon the concepts of Apache Ant &#38; Apache Maven. Gradle uses Groovy instead of XML for declaring the project configuration. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-gradle-ubuntu-20-04/">How to install Gradle on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>Hi, folks. In this post dedicated to Java, you will learn how to install Gradle on Ubuntu 20.04</strong></p>



<p><a aria-label="undefined (opens in a new tab)" href="https://gradle.org/" target="_blank" rel="noreferrer noopener">Gradle</a> is an open-source build automation tool used for Java, <a aria-label="undefined (opens in a new tab)" href="https://www.osradar.com/install-apache-groovy-ubuntu-debian/" target="_blank" rel="noreferrer noopener">Groovy</a>, and Scala development. Basically, it builds upon the concepts of Apache Ant &amp; <a aria-label="undefined (opens in a new tab)" href="https://www.osradar.com/install-apache-maven-ubuntu-20-04/" target="_blank" rel="noreferrer noopener">Apache Maven</a>. Gradle uses Groovy instead of XML for declaring the project configuration. Groovy is a dynamic, object-oriented programming language to define the project configurations.</p>



<p>So, let us start.</p>



<h2>Installing Gradle on Ubuntu 20.04</h2>



<p>Gradle is important for the effective development of Java applications. So the first requirement is to install Java on Ubuntu 20.04.</p>



<p>So, open a terminal and install it using the following command:</p>



<pre class="wp-block-preformatted">:~$ sudo apt install openjdk-11-jre
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
at-spi2-core ca-certificates-java fonts-dejavu-extra java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data
libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgif7 libgl1
libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 liblcms2-2 libllvm10 libnspr4 libnss3 libpciaccess0 libpcsclite1 libsensors-config libsensors5
libsm6 libvulkan1 libwayland-client0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shape0 libxcb-sync1
libxcomposite1 libxdamage1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1
libxxf86vm1 mesa-vulkan-drivers openjdk-11-jre-headless x11-common x11-utils
Suggested packages:
default-jre cups-common liblcms2-utils pcscd lm-sensors libnss-mdns fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
mesa-utils
The following NEW packages will be installed:
at-spi2-core ca-certificates-java fonts-dejavu-extra java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data
libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgif7 libgl1
libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 liblcms2-2 libllvm10 libnspr4 libnss3 libpciaccess0 libpcsclite1 libsensors-config libsensors5
libsm6 libvulkan1 libwayland-client0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shape0 libxcb-sync1
libxcomposite1 libxdamage1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxmu6 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1
libxxf86vm1 mesa-vulkan-drivers openjdk-11-jre openjdk-11-jre-headless x11-common x11-utils
0 upgraded, 68 newly installed, 0 to remove and 86 not upgraded.
Need to get 71.3 MB of archives.
After this operation, 555 MB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="353" src="https://www.osradar.com/wp-content/uploads/2020/08/1-4-1024x353.png" alt="1.- Installing Java on Ubuntu 20.04" class="wp-image-22376" srcset="https://www.osradar.com/wp-content/uploads/2020/08/1-4-1024x353.png 1024w, https://www.osradar.com/wp-content/uploads/2020/08/1-4-300x104.png 300w, https://www.osradar.com/wp-content/uploads/2020/08/1-4-768x265.png 768w, https://www.osradar.com/wp-content/uploads/2020/08/1-4-696x240.png 696w, https://www.osradar.com/wp-content/uploads/2020/08/1-4-1068x369.png 1068w, https://www.osradar.com/wp-content/uploads/2020/08/1-4.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Installing Java on Ubuntu 20.04</figcaption></figure>



<p>Once you have entered your password, the installation will begin.</p>



<p>When the installation is finished, you can check the version of Java installed:</p>



<pre class="wp-block-preformatted">:~$ java --version
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)</pre>



<p>This indicates that Java is ready for action.</p>



<h3>Downloading and installing Gradle on Ubuntu 20.04</h3>



<p>Now the next step is to download and install Gradle. To do this, go to the /tmp/ folder and use the wget command to download:</p>



<pre class="wp-block-preformatted">:~$ wget -c https://services.gradle.org/distributions/gradle-6.5.1-bin.zip
--2020-08-02 19:24:17-- https://services.gradle.org/distributions/gradle-6.5.1-bin.zip
Resolving services.gradle.org (services.gradle.org)… 104.18.191.9, 104.18.190.9, 2606:4700::6812:bf09, …
Connecting to services.gradle.org (services.gradle.org)|104.18.191.9|:443… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: https://downloads.gradle-dn.com/distributions/gradle-6.5.1-bin.zip [following]
--2020-08-02 19:24:18-- https://downloads.gradle-dn.com/distributions/gradle-6.5.1-bin.zip
Resolving downloads.gradle-dn.com (downloads.gradle-dn.com)… 104.17.160.20, 104.17.159.20, 2606:4700::6811:9f14, …
Connecting to downloads.gradle-dn.com (downloads.gradle-dn.com)|104.17.160.20|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 102367135 (98M) [application/zip]
Saving to: ‘gradle-6.5.1-bin.zip’
gradle-6.5.1-bin.zip 100%[=====================================================================================>] 97.62M 841KB/s in 2m 2s
2020-08-02 19:26:21 (821 KB/s) - ‘gradle-6.5.1-bin.zip’ saved [102367135/102367135]</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="279" src="https://www.osradar.com/wp-content/uploads/2020/08/2-2-1024x279.png" alt="2.- Download and installing Gradle on Ubuntu 20.04" class="wp-image-22377" srcset="https://www.osradar.com/wp-content/uploads/2020/08/2-2-1024x279.png 1024w, https://www.osradar.com/wp-content/uploads/2020/08/2-2-300x82.png 300w, https://www.osradar.com/wp-content/uploads/2020/08/2-2-768x209.png 768w, https://www.osradar.com/wp-content/uploads/2020/08/2-2-696x190.png 696w, https://www.osradar.com/wp-content/uploads/2020/08/2-2-1068x291.png 1068w, https://www.osradar.com/wp-content/uploads/2020/08/2-2.png 1365w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Download and installing Gradle on Ubuntu 20.04</figcaption></figure>



<p>At the time of writing this post, <strong>the latest stable </strong>version of Gradle is 6.5.1 So, check first which is the latest version and modify the command.</p>



<p>If you don&#8217;t have the <code>unzip</code> command installed, do it because we will need it.</p>



<pre class="wp-block-preformatted">sudo apt install unzip</pre>



<p>Now unzip the downloaded file into a directory like /opt/ where it will remain indefinitely:</p>



<pre class="wp-block-preformatted">:~$ sudo unzip -d /opt/gradle gradle-6.5.1-bin.zip</pre>



<p>The next step is to make Gradle available from anywhere in the terminal. Also, make it available to all users.</p>



<p>To do this, create a new file called gradle.sh in /etc/profile.d/</p>



<pre class="wp-block-preformatted">:~$ sudo nano /etc/profile.d/gradle.sh</pre>



<p>And add the following content:</p>



<pre class="wp-block-preformatted">export GRADLE_HOME=/opt/gradle/gradle-6.5.1<br>export PATH=${GRADLE_HOME}/bin:${PATH}</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="892" height="154" src="https://www.osradar.com/wp-content/uploads/2020/08/3-1.png" alt="3.- Configuring Gradle " class="wp-image-22378" srcset="https://www.osradar.com/wp-content/uploads/2020/08/3-1.png 892w, https://www.osradar.com/wp-content/uploads/2020/08/3-1-300x52.png 300w, https://www.osradar.com/wp-content/uploads/2020/08/3-1-768x133.png 768w, https://www.osradar.com/wp-content/uploads/2020/08/3-1-696x120.png 696w" sizes="(max-width: 892px) 100vw, 892px" /><figcaption>3.- Configuring Gradle </figcaption></figure>



<p>Save the changes, and close the editor.</p>



<p>Assign execution permissions to the file:</p>



<pre class="wp-block-preformatted">:~$ sudo chmod +x /etc/profile.d/gradle.sh</pre>



<p>And finally, source the file to apply the changes:</p>



<pre class="wp-block-preformatted">:~$ source /etc/profile.d/gradle.sh</pre>



<p>Now you can use Gradle from the terminal. So, check the installation, showing the version of the program:</p>



<pre class="wp-block-preformatted">:~$ gradle -v
Welcome to Gradle 6.5.1!
Here are the highlights of this release:
Experimental file-system watching
Improved version ordering
New samples
For more details see https://docs.gradle.org/6.5.1/release-notes.html

Gradle 6.5.1
Build time: 2020-06-30 06:32:47 UTC
Revision: 66bc713f7169626a7f0134bf452abde51550ea0a
Kotlin: 1.3.72
Groovy: 2.5.11
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 11.0.8 (Ubuntu 11.0.8+10-post-Ubuntu-0ubuntu120.04)
OS: Linux 5.4.0-33-generic amd64</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="971" height="483" src="https://www.osradar.com/wp-content/uploads/2020/08/4-1.png" alt="4.- Gradle on Ubuntu 20.04" class="wp-image-22379" srcset="https://www.osradar.com/wp-content/uploads/2020/08/4-1.png 971w, https://www.osradar.com/wp-content/uploads/2020/08/4-1-300x149.png 300w, https://www.osradar.com/wp-content/uploads/2020/08/4-1-768x382.png 768w, https://www.osradar.com/wp-content/uploads/2020/08/4-1-696x346.png 696w" sizes="(max-width: 971px) 100vw, 971px" /><figcaption>4.- Gradle on Ubuntu 20.04</figcaption></figure>



<p>So, enjoy it. Gradle is installed and ready to start work.</p>



<h2>Conclusion</h2>



<p>Gradle is a tool for the development of Java applications. So, thanks to this post, you have learned how to install it in a system like Ubuntu 20.04 that is so popular among Java developers.</p>



<p>So, share this post, and join <a href="https://t.me/osradar" target="_blank" aria-label="undefined (opens in a new tab)" rel="noreferrer noopener">our Telegram Channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-gradle-ubuntu-20-04/">How to install Gradle on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-gradle-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
