BlueDragon
25-04-2006, 13:36
Apro il thread qui così non continuiamo a parlarne nel Bug Report thread ;)
Codice:
sh DiamondCrush.sh
executing "java -Djava.library.path=lib/linux -jar DiamondCrush.sh"
Failed to load Main-Class manifest attribute from DiamondCrush.sh
La soluzione forse è qua: http://forum.java.sun.com/thread.jspa?threadID=549376&messageID=2680601
La versione è quella Linux a 32 bit.
Il problema non è quello più banale, cioé l'essersi dimenticati l'attributo Main-Class nel manifest, ma direi che il link segnalato da Ufo contiene probabilmente la soluzione: unix e windows gestiscono diversamente gli "a capo" :)
Può essere che il manifest di Linux abbia gli a capo non corretti e quindi l'attributo non viene caricato.
Anche se mi sembra un po' strano il fatto che non ce ne siamo accorti prima, visto che molti di noi nel progetto hanno Linux..forse c'è stata una modifica all'ultimo momento nel manifest?
Vi riporto qui alcuni post salienti nel thread indicato da Ufo su Java Sun Forum:
I'm guessing that you are developing in windows.
One diference between unix and windows' file system is that text files in unix always have a final linebreak at the end of the file, while windows doesn't need to.
Java, being developed by Sun primarily for the unix comunity requires that the manifest file ends with a new-line.
no new-line, no manifest file.
The JAR tool is rather finicky. I have found that each HEADER:VALUE pair must be separated by a newline but not more than 1 newline. When I tried putting blank lines in the MANIFEST, I would get "Error: failed to load Main-Class attribute...". Sun needs to update their tutorials or fix this problem with the JAR tool's manifest parser. I put a sample MANIFEST.MF below (it works).
Manifest-Version: 1.0
Name: com/co_name/software_name/
Main-Class: com.co_name.software_name.MainClass
Sealed: true
Codice:
sh DiamondCrush.sh
executing "java -Djava.library.path=lib/linux -jar DiamondCrush.sh"
Failed to load Main-Class manifest attribute from DiamondCrush.sh
La soluzione forse è qua: http://forum.java.sun.com/thread.jspa?threadID=549376&messageID=2680601
La versione è quella Linux a 32 bit.
Il problema non è quello più banale, cioé l'essersi dimenticati l'attributo Main-Class nel manifest, ma direi che il link segnalato da Ufo contiene probabilmente la soluzione: unix e windows gestiscono diversamente gli "a capo" :)
Può essere che il manifest di Linux abbia gli a capo non corretti e quindi l'attributo non viene caricato.
Anche se mi sembra un po' strano il fatto che non ce ne siamo accorti prima, visto che molti di noi nel progetto hanno Linux..forse c'è stata una modifica all'ultimo momento nel manifest?
Vi riporto qui alcuni post salienti nel thread indicato da Ufo su Java Sun Forum:
I'm guessing that you are developing in windows.
One diference between unix and windows' file system is that text files in unix always have a final linebreak at the end of the file, while windows doesn't need to.
Java, being developed by Sun primarily for the unix comunity requires that the manifest file ends with a new-line.
no new-line, no manifest file.
The JAR tool is rather finicky. I have found that each HEADER:VALUE pair must be separated by a newline but not more than 1 newline. When I tried putting blank lines in the MANIFEST, I would get "Error: failed to load Main-Class attribute...". Sun needs to update their tutorials or fix this problem with the JAR tool's manifest parser. I put a sample MANIFEST.MF below (it works).
Manifest-Version: 1.0
Name: com/co_name/software_name/
Main-Class: com.co_name.software_name.MainClass
Sealed: true