How do I convert the src.zip file to jar file?

Please any one give me the suggestion for this. I'm having the Xerces-J-source.zip file and I need to convert to Xerces-J-source.jar file.

Upvotes: 5

Views: 71602

Answers (2)

Michael Laffargue
Michael Laffargue

Reputation: 10304

Generally if your ZIP contains the class files (And not the sources):

Just rename the file, a jar is a zip file. But if you're aiming for a class to be launched with command java -jar myProject.jar you should create a MANIFEST file containing the main-class and libraries to use in the classpath.

So in your case since you got the sources (Java file), you'll have to compile classes and create the JAR. Eclipse has an Export as JAR feature if you use it.

Upvotes: 11

jddsantaella
jddsantaella

Reputation: 3687

That doesn't make any sense. If you need Xerces-J the better is download the jars from the website.

If you want the get the jar form the source, you need to compile it, but there is no need when you can download it.

Upvotes: 0

Related Questions