简体   繁体   中英

Eclipse create runnable jar problem

Ok I created a new Java project in Eclipse with Java class and its main method. Then when doing an export - runnable jar I do not see my new project being listed in the "Launch Configurations" drop down. I can see other projects but not the newly created one.

I'm I missing something?

public class SSLTest {
   public static void main(String[] args)  {
}
}

Did you run SSLTest in Eclipse? I think you need to run that class (through the Run menu) in order for Eclipse to create a launch configuration.

Go to Run as-> Run as Java Application your java file having main class. There you go -> Now you can see your project listed in "Launch Configurations" when you try to export as runnable jar file.

In eclipse there are different categories of run configurations. "Eclipse Application" configs can't be used to create runnable jars. You need to have a "Java Application" configuration.

In Eclipse, under the file tab, choose runnable jar file under java folder, fill in information, u need a launchConfig and then u can save it

Good Luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM