• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Running JAR file problem...

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i've created a jar file like :
jar cmf mainClass NewKeyword.jar com Classes
where, mainClass is my manifest file which has
Main-Class: GUIKW001
com,Classes are packages used by the main-class.
This works fine and my jar file is created but the problem im
facing is that when i run the jar file like :
jar -jar NewKeyword.jar
it is showing FAILED TO LOAD MAIN-CLASS MANIFEST ATTRIBUTE FROM NEWKEYWORD.JAR...and im using jdk1.2.2
whats the error?...pl,help me out...
thanx in advance,
sathish
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Satish,
To run the jar file, you need to give the following comand on command prompt
java- jar NewKeyword.jar
Apart from this, after having a manifest file for main class, as U have already given, U must be able to run the application by double-clicking on it( jar file) in the windows-explorer. Or else give me your code and I will run it for U
Cheers :-)
NK

Originally posted by Sathish Babu:
hi all,
i've created a jar file like :
jar cmf mainClass NewKeyword.jar com Classes
where, mainClass is my manifest file which has
Main-Class: GUIKW001
com,Classes are packages used by the main-class.
This works fine and my jar file is created but the problem im
facing is that when i run the jar file like :
jar -jar NewKeyword.jar
it is showing FAILED TO LOAD MAIN-CLASS MANIFEST ATTRIBUTE FROM NEWKEYWORD.JAR...and im using jdk1.2.2
whats the error?...pl,help me out...
thanx in advance,
sathish


 
Sathish Babu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Nk,
Im sorry to say that i made a mistake in my posting...
its the same which u've mentioned...
java -jar KeywordSearch.jar
and im happy to say that i found the prob by myself...
the prob was with the manifest file in which i didn't give a
carriage return...now its working fine...thanx for responding
my god! i've wasted nearly 2 hrs for where i made the mistake...
 
reply
    Bookmark Topic Watch Topic
  • New Topic