• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running JAR file problem...

 
Sathish Babu
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Neeraj Kohli
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic