简体   繁体   中英

Creating a jar file from Scala project without using Sbt or Maven

I developed a Scala project using Scala eclipse Ide. How do I get a jar file from this project so that i can run the Scala classes present in the project through command line?

You don't need to use SBT in order to create an executable jar file. A jar file is essentially only a zip file with a fixed internal structure. A jar file can contain a file "META-INF/MANIFEST.MF" with metdata like for instance the main class.

Refer to the Jar file article on Wikipedia for more information.

There is a command line tool called "jar" which can help you creating a valid Java Archive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM