Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Why am I getting "no main manifest attribute, in main.jar" error message

+4 votes
asked Mar 26, 2025 by gerard walden (350 points)
I started learning Kotlin about 18 months ago and, having tried various compilers, found GDB. It does everything I need and has been fine for the past 9 months I have been using it. For reasons unknown it has now started throwing up an error message when I load and attempt to run saved files. The message reads "no main manifest attribute, in main.jar". Until recently I had no issue whatsoever. I could write code with Kotlin, run it, save it and run it again without problems. When I start GDB now it starts with the usual "Hello World" and will run it but if I save that, load it again and attempt run it I get the same message. I would hate the idea of having to give up with GDB, it does all I need and is about the only compiler to recognise Kotlin's readln() statement.

Any assistance form other users will be gratefully received.

Regards Ged

1 Answer

0 votes
answered Mar 27, 2025 by Peter Minarik (101,340 points)
I am not a Java developer, but when I played around with some toy projects, I remember I couldn't use packages in OnlineGDB. If I did not put my code into a package, it worked. Maybe you have the same problem.

Please, share your code for analysis.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...