Create Jar library without main class

Today I just created a Java library. I created it using the main class since IntelliJ IDEA 14 asked me to add it. However, I want it to be a regular library without core classes. Is it possible to create a jar file from such a project without having one class with the main method? If so, how do you create such a jar.

It seems foolish to have a basic method if you never use it.

+6
source share
1 answer

Create an Artifact, as in this article, but without specifying the main class http://blog.jetbrains.com/idea/2010/08/quickly-create-jar-artifact/

Then click Build> Build Artifact> Build.

This works even if there is no main class.

+1
source

Source: https://habr.com/ru/post/986989/


All Articles