From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ef8bca9082d661b9 X-Google-Attributes: gid103376,public From: Geoff Bull Subject: JGNAT: Re: can't run my jarmake output Date: 2000/04/06 Message-ID: <38EC0AE3.C65548D0@research.canon.com.au>#1/1 X-Deja-AN: 607381362 Content-Transfer-Encoding: 7bit References: <38EBF447.6C287831@calpoly.edu> To: John Dalbey X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@research.canon.com.au X-Trace: cass.research.canon.com.au 954993347 15749 203.12.174.227 (6 Apr 2000 03:55:47 GMT) Organization: Canon Information Systems Research Australia Mime-Version: 1.0 NNTP-Posting-Date: 6 Apr 2000 03:55:47 GMT Newsgroups: comp.lang.ada Date: 2000-04-06T03:55:47+00:00 List-Id: John Dalbey wrote: > > JGNAT looks really neat so far ... > > > but I can't figure out how to run the .jar files produced by the jarmake > tool. > > $ jarmake -oblastoff.jar blastoff.class > > $ java -jar blastoff.jar > Failed to load Main-Class manifest attribute from > blastoff.jar This is because jarmake doesn't add a manifest to the jarfile, and looking at the source I couldn't see an option to make it do so You could add one by: Unpacking the jar file. $ jar xvf blastoff.jar Creating a manifest file: $ echo "Main-Class: blastoff" > blastoff.manifest Then rebuild the jarfile with the command: $ jar cmf blastoff.manifest new_blastoff.jar all_the_files_you extracted. $ java -jar new_blastoff.jar should work. I think all_the_files_you extracted = blastoff.class ada_blastoff.class jgnat I tried this with the hello example and it worked. If there really is no way to make jarmake add a manifest specifying the main class, then that is a major shortcoming. There is another (better) way to work around this: $ mkdir META-INF $ echo "Main-Class: blastoff" > META-INF/MANIFEST.MF $ jarmake -oblastoff.jar blastoff.class META-INF/MANIFEST.MF $ java -jar blastoff.jar Cheers Geoff