How to install Java for development in AryaLinux

In this article
  1. Installing Java
  2. Installing maven
  3. Installing Eclipse IDE
  4. Installing MariaDB

Installing Java

The Java programming language is a widely used programming language used by developers accross the world and by Enterprises and Organizations alike. The original Java programming language developed by Sun Microsystems is an Oracle property now and hence in order to install Oracle JDK, you need to download Oracle JDK from Oracle's website and follow this article to install the downloaded binary. Please avoid step 7 and step 8 because they are Ubuntu specific commands. You need to accept the Oracle Java's License Agreement before you download Oracle's JDK.

An alternative to using Oracle's JDK you can also use openjdk which is developed by the community and is compatible with Oracle JDK. There are differences which might cause an impact in production servers but for development purposes openjdk should just be fine. Run the following command to run openjdk from the terminal.

alps install openjdk

The buildscript for openjdk installs openjdk in /opt and also sets the PATH and JAVA_HOME variables so you do not have to worry about them. To make the changes take effect, please restart the system. In case you would not be able to restart the system immediately you can run the following command from the terminal temporarily for it to recognize openjdk:

source /etc/profile
Top

Installing maven

Maven is a build tool that Java developers should be familiar with. It makes the complex process of building and packaging Java applications and dependency management very easy. Here is the command to install maven:

alps install maven

If while run the mvn command, you get command not found. Run the following command:

source /etc/profile
Top

Installing Eclipse IDE

If you are doing Java development, you might need the Eclipse IDE as well. In order to install the Eclipse IDE, download it from their website - https://www.eclipse.org/downloads/. Then open up the Binary Application Installer from the Applications -> Systems menu, click the browse button and point to the eclipse Binary just downloaded and click the Install button. Eclipse needs Java to run so please install openjdk first.

Top

Installing MariaDB

While doing java development one might need a backend database management system to store data. While there are plenty of database management systems that Java can be used with a very popular database that is used with Java is MySQL. Once again MySQL is also a property of Oracle but the community built mariadb can be used as a drop in replacement for MySQL. Use the following command to install mariadb:

alps install mariadb
Top