8

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)  {
}
}
Marquinio
  • 81
  • 1
  • 1
  • 2

4 Answers4

13

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.

Kaleb Brasee
  • 51,193
  • 8
  • 108
  • 113
2

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.

Sayan
  • 145
  • 2
  • 15
  • 1
    This was the key for me. The configuration was not available as I was always running my class as a TestNG test. Once I ran it as a Java Application I was able to see the launch configuration when exporting to jar. – moo moo Sep 18 '13 at 06:57
0

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.

cmbryan
  • 395
  • 2
  • 9
-1

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!

CollinD
  • 7,304
  • 2
  • 22
  • 45
myname
  • 1