Jar

How to convert the type of the file from JAR to Executable Jar file.
Thanks&Regards,
Anantharamulu.

How to convert the type of the file from JAR to Executable Jar file.
Thanks&Regards,
Anantharamulu.
hi @anantharamulu_g ,
You can convert a regular JAR file into an executable JAR file by following these steps:
1. Create a file named MANIFEST.MF in the same directory as your JAR file. Add the following contents to the file:
Manifest-Version: 1.0
Main-Class: com.example.MainClass
2. Open a command prompt or terminal window.Navigate to the directory containing your JAR file and the MANIFEST.MF file and Run the following command:
jar cfm myapp.jar MANIFEST.MF com/example/*.class
3. To test the executable JAR file, Run the following command to start your application:
java -jar myapp.jar
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.