Could not find the main class x. Program will Exit
I explore other threads on stackoverflow, I explore the web but couldn't find the solution... so I am posting it here with full "hello world" example. I am using Eclipse 3.6/jdk 1.6 I write a one class using swt and want to export it as runnable file.
Here is how I am trying to do it:
File->Export->Java->Jar ...in the followin开发者_StackOverflow社区g dialogs I select to create new manifest and select my mainc class for entry point, export it and run it but get this error:
Could not find the main class co.My. Program will Exit
Here is my Manifest.mf file, with two empty lines at the end:
Manifest-Version: 1.0
Main-Class: co.My
In class I have method:
public static void main(String args[])
And here is download link for whole "hello world" project. http://www.mediafire.com/?wl6mixmpatpglwh
If I remember good, there is in Eclipse also an option to create a Runnable Jar File.
This will help to solve the problem
精彩评论