Greetings, fellow javers!

I am trying to read up on how to create executable jar files, but almost every tutorial or instruction is a step-by-step guide which should be executed from the command string.

I would very much appreciate, if anyone could explain how to create an executable jar file in IDEA from a most simple IDEA project. It can just be the Main.java class. All I want my standalone jar application to be able to do is to open a console window, basically just print a string

Lets say that is my Main class
Java Code:
public class Main {
    public static void main(String[] args) {
        System.out.println("I'm in class Main method main(String[] args)");
    }
All I want my jar file to do when I double click it is to write the line "I'm in class Main method main(String[] args)" in the console window.

As I understand from what I have read upon the subject, the jar file must contain all the compiled classes my application uses and a MANIFEST.MF file, which should contain the information about which class is the entry point(contains main(String[] args) for example). I've compiled my Main.java into Main.class, created the MANIFEST.MF file. I have then put both of these files in a jar archive. That archive doesn't execute neither from the explorer, nor from the cmd.

Please point out what I am doing wrong.

When I try to create a jar file in IDEA, it creates a jar file with MANIFEST.MF in it with a correct path to my main class, and another jar file called HelloWorld.jar, where HelloWorld is the name of my IDEA project.

If you can help explain how to make an executable jar file in IDEA, or manually, please reply to this post.

Hope I made myself clear enough for everyone else to understand.

Best wishes,
Andrew