user1728119
user1728119

Reputation: 387

Jar inclusion Issue

How can i add external jars to my project before exporting the project so that the person about to use my code need not have to download those jars.He simply has to refer the jar i provided to run my project(Not using Maven). Thanks

Upvotes: 2

Views: 68

Answers (1)

Wolfgang Fahl
Wolfgang Fahl

Reputation: 15769

You might want to create a zip file containing your_jar.jar the libraries needed in a subdirectory lib and add a manifest-classpath entry to point to those libraries

Manifest-Version: 1.0
Created-By: Hand
Main-Class: com.bitplan.gen.parser.m2java
Class-Path: lib/com.bitplan.smartgenerator-4.2.3.jar 

After unzipping your code can be started with java -jar your_jar.jar

Upvotes: 1

Related Questions