How to set JAVA_HOME environment variable automatically on Linux

Question: I need to compile a Java program on my Linux box. For that I already installed JDK (Java Development Kit), and now I’m trying to set JAVA_HOME environment variable to point to the installed JDK. What is the recommended way to set JAVA_HOME environment variable on Linux? Many Java programs or Java-based IDE environments […]
Continue reading…

 

How to change default Java version on Linux

Question: When I am trying to run a Java program on Linux, I am getting the following error. Looks like the Java program is compiled for a different Java version than the default Java program installed on my Linux. How can I switch the default Java version on Linux? Exception in thread “main” java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf […]
Continue reading…

 

How to install Apache Tomcat on Ubuntu or Debian

Question: I need to run a Java web application, and for that I’m trying to use Apache Tomcat. How can I install Apache Tomcat on Debian or Ubuntu Linux? Apache Tomcat is an open-source implementation of Java servlet engine and a J2EE container. It is one of the most popular applications in today’s enterprise data […]
Continue reading…

 

How to install Java development kit (JDK) on Linux

Question: I need to install Java Development Kit (JDK) for compiling a Java application. How can I install JDK on [insert your Linux distro]? When developing a Java application or a Java-based component, you first need to set up Java development environment. For that, you install JDK on your Linux system. JDK contains a collection […]
Continue reading…

 

How to install Java runtime on Linux

Question: I want to run a Java application on my Linux. For that, I need to set up Java Runtime Environment (JRE). How can I install Java Runtime on [insert your Linux distro]? Java Runtime Environment (JRE) or Java Runtime is a minimal set of Java SDK, which allows one to run Java applications. JRE […]
Continue reading…