How to create a manifest file with Maven

This tutorial will show you how to use the maven-jar-plugin to create a manifest file, and package / add it into the final jar file. The manifest file is normally used to define following tasks : Define the entry point of the Application, make the Jar executable. Add project dependency classpath. When you run the …

Read more

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. 1. AWT Example Create a simple AWT Java application, just display label and print out some funny characters ~ AwtExample.java package com.mkyong.awt; import java.awt.Frame; import java.awt.Label; …

Read more

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 how to add a custom manifest file into a Jar file. 1. Project Structure Assume this is your project folder structure /workspace/test/classes/com/mkyong/awt/AwtExample.class /workspace/test/classes/manifest.txt 2. Jar …

Read more