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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beb861-13fc5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beb861-13fc5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?