how to create a java library in intellij
From the main menu, select File | Project Structure Ctrl+Alt+Shift+S. Under Project Settings, select Libraries. Click the Add button and select one of the following: Select Java or Kotlin/JS to add a library from the files located on your computer. Select From Maven to download a library from Maven.