Image of Eclipse – Main class doesn’t show when exporting a runnable jar file

ADVERTISEMENT

Table of Contents

Introduction

Sometimes when trying to export a runnable jar file in Eclipse, your main class doesn’t show up. This tutorial guides you on how to fix this issue.

If it happens to get a blank list in the “Launch Configuration” combo of the “Runnable JAR File Export” page in Eclipse, or you couldn’t find your main class:

launch config

Then, all you have to do is to open your class and then run it as a Java Application through:

right-click -> Run As -> Java Application

java application

After you run it at least once, your main class will then show in the “Launch Configuration” combo of the export page.

Summary

Sometimes when trying to export a runnable jar file in Eclipse, your main class doesn’t show up. This tutorial guides you on how to fix this issue.

Next Steps

If you're interested in learning more about the basics of Java, coding, and software development, check out our Coding Essentials Guidebook for Developers, where we cover the essential languages, concepts, and tools that you'll need to become a professional developer.

Thanks and happy coding! We hope you enjoyed this article. If you have any questions or comments, feel free to reach out to jacob@initialcommit.io.

Final Notes