Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Manifest problems

 
Stephen Black
Ranch Hand
Posts: 52
1
Chrome MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having trouble with jar file manifests
I type >Java -jar 17PackAndSend.jar
and i get the error "Could not find or load main class 17PackAndSend.jar"

The manifest is as follows
Manifest-Version: 1.0
Main-Class: 17PackAndSend.Packin

Ant-Version: Apache Ant 1.8.3
Created-By: 1.7.0_10-b18 (Oracle Corporation)

I am out of ideas on this one I even changed the name of the classes folder to match the jar file name all to no avail
PackSendJar.png
This is the faulty jar as shown by winzip
[Thumbnail for PackSendJar.png]
 
Winston Gutkowski
Bartender
Pie
Posts: 10111
56
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephen Black wrote:I am out of ideas on this one I even changed the name of the classes folder to match the jar file name all to no avail

Well, for starters:
Main-Class: 17PackAndSend.Packin
looks bad to me because Java class (and package) names are not allowed to start with numbers.

Winston
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should be a carriage return after you specify the Main-Class : <class name> inside your Manifest file. Provide that, make the jar again, and try executing it. Let me know what happens.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic