• Post Reply Bookmark Topic Watch Topic
  • New Topic

getting an error while executing jar file  RSS feed

 
budsy remo
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am getting an error which says Could not find the main Class : AGame.System will exit


here's how i created the jar file : jar vcfe app.jar AGame *.class

the jar file is created and then when i double click or run : javaw -jar app.jar

it gives the specified error
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you set the application's Entry point?
 
budsy remo
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yea it was AGame
i specified in the command itself . But still how do i specify it since i think i specied in the command as jar vcfe app.jar AGame *.class . Is that not the command?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TellTheDetails


Can you cut-n-paste the error (hopefully with stack trace) that you got?

Henry
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also please show us the contents of the manifest file.
 
budsy remo
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manifest-Version: 1.0
Created-By: 1.6.0_22 (Sun Microsystems Inc.)
Main-Class: AGame
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
budsy remo wrote:Manifest-Version: 1.0
Created-By: 1.6.0_22 (Sun Microsystems Inc.)
Main-Class: AGame
Are you using the fully-qualified name of the AGame class? Have you got a new line at the very end of the file?
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and I see from the Java™ Tutorials that there is a new way to set the entry point for a .jar. It's at the bottom of the page.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!