ERROR Source or Target option 1.5 is no longer supported. Use 1.6 or later
It all happens when I was trying to build a springboot application by ./mvnw clean install. When I first run the install command, it runs into following problem: Source option…
Maven Profiles example
In this article, we will show you few Maven profile examples to pass different parameters (server or database parameters) for different environments (dev, test or prod). Tested with Maven 3.5.3
Create a fat Jar file – Maven Shade Plugin
In this tutorial, we will show you how to use Maven Shade Plugin to create a Jar together with its dependency Jars into a single executable Jar file, so called…
Create a fat Jar file – Maven Assembly Plugin
In this tutorial, we will show you how to create a fat/uber jar with Maven Assembly Plugin. Which means create a Jar together with its dependency Jars into a single…
The Java Archive Tool (JAR) Examples
Learn how to use JAR tool: 1 - Create a jar file, 2 - Update a jar file , 3 - Extract a jar file , 4 - List files…
How to add a manifest into a Jar file
In Java, you can use manifest file to define application’s entry point, adding classpath or package version for a JAR file. In this short tutorial , we will show you…
Maven – Create a fat Jar file – One-JAR example
In this tutorial, we will show you how to use Maven build tool, One-JAR plugin to create a single Jar together with its dependency Jars into a single executable Jar…
Maven – Exclude log4j.properties in Jar file
This example shows you how to use Maven to exclude the log4j.properties file from your Jar file. Please, DO NOT include the log4j.properties into the final Jar file, it will…
How to make a Java exe file or executable JAR file
In this tutorial, we will show you how to create a executable JAR – When you double click on it, it runs the defined main class in manifest file.
How to get the Tomcat home directory in Java
Is there a function in Java to retrieve the Tomcat (Catalina) home directory? Yes, Tomcat home directory or Catalina directory is stored at the Java System Property environment. If the…