Cannot create artifacts
Answered
Hello, I'm trying to export my Java project as JAR file.
However, going to create the artifats, from the menu I cannot select the main of my project (I can't select anything)
How can I do?
Artifacts creation:

My file:

the main is main_db.java
Thank you
Please sign in to leave a comment.
Are you able to manually type your main class name similar to the video here: https://www.jetbrains.com/help/idea/working-with-artifacts.html#configure_artifact
Upload id: 2025_10_01_DfzfYcV38iUEswMUqfeKFP (file: recording.mp4)
If I try to write manually, the Manifest file is not valid(I also did this test in the video)
Could you wrap the main method to with the class name(main_db) like below and try? Using functions without an explicitly defined class is apt for a single file application, but for the JAR entry point the class name should be defined.
class main_db{void main(){System.out.println("Hello World"); System.out.println(this.getClass().getName()); }}Thank you, i solved the problem