When I press “build project” it NetBeans builds, as far as I could find, separate class files. How can I set it to build them into a jar file? Even better it’d be if I can build several applications (all separately runnable from command line) from one project.
I code Scala 2.8.
Using the
Run > Clean and Build Main Projectcommand in NetBeans puts your program’s JAR in a folder nameddistlocated at the root level of the project; any associated libraries go indist/lib. As discussed here, a JAR’s manifest may have only oneMain-Classattribute, but the JAR itself may have an arbitrary number of classes that declare amain()method.Addendum: Here is a concrete example using H2 Database.
Addendum: External libraries are often added via the Library Manager.