How does Idea package a single java file

for example, I wrote a utility class in a project, and considering that this class is of great use, I want to type it into a jar package for other projects to use.
how do I package this single file when using idea? Many tutorials on the Internet package the whole project

Mar.12,2021

https://codeshelper.com/q/10.

send a screenshot for easy understanding

clipboard.png

clipboard.png

clipboard.png

clipboard.png


clipboard.png

clipboard.png

that's what I did. I don't know if I'm right

.
Menu