[Jar Executable] Could not find the main class. Progam will exit.
Hello,
I am a French person. Excuse me for my English who is not perfect.
I seek to create an achievable "jar". I followed the instructions given in the url [url]http://java.developpez.com/faq/java/?page=execution#creationJar[/url], and on the site of Sun.
I have today only one class which I posed in a specific repertory "Class".
Appli
|__Class
|__Src
|__META-INF
The contents of my "Manifest" is stored in repertory META-INF with the name "Commission2007.MF" and its contents are as follows:
Manifest-Version: 1.0
Created-By: 1.5.0 (Sun Microsystems Inc.)
Main-Class: Commission2007
.
I've left the space line at the end of the file.
Here the result of execution of my order "jar":
C:\#Java Dev\2007_Commissionnements>jar cvfm Commission2007.jar META-INF/Commission2007.MF -C Class/ .
manifest ajout?ajout : Class/./(entr趀 = 0) (sortie = 0)(0% stock?
ajout : Class/./Commission2007.class(entr趀 = 9060) (sortie = 4547)(49% compress趕)
I controlled the assignment of the extension "jar" in "Working station = > Tools = > Files Option = > Files Type = > .jar Selection = > Advance =
> Open = > Change = >" C:\Program Files\Java\jre1.6.0\bin\javaw.exe "- gravel bank" %1 "% *". Thus not of problem on this side there!
When I double click on the file "jar" lately created, I have the error message according to:"Could not find the main class. Progam will exit. " I do not understand the reason of this error. I consulted all the subjects on the treating Net of this subject but without result. I thus call upon you.
Perhaps that the cause is in my code which however functions perfectly when I carry out it with the order: "Commission2007 java". The class "hand" is quite present to see the code below. You can find the totality of my code on the bond [url]http://www.developpez.net/forums/showpost.php?p=1870361&postcount=74[/url]
import ?
publicclass Commission2007extends Frameimplements ActionListener, WindowListener
{
?
//--
// Construction de la class EdText
// D俧inition et affichage de la bo宼e de dialogue
//--
Commission2007()
{
?}
//-
// D俧inition d'une frame pour l'application et affichage de la
// bo宼e de dialogue
//-
publicstaticvoid main(String args[])
{
Commission2007 editer =new Commission2007();
editer.show();
editer.addWindowListener(editer);
}
}
I thank you in advance for your assistance.
Cordially, Gilles.

