aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes error in running server- problem with jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "error in running server- problem with jar file" Watch "error in running server- problem with jar file" New topic
Author

error in running server- problem with jar file

Reshma Das
Ranch Hand

Joined: Jan 29, 2002
Posts: 125
D:\Developer\scjd\starting>jar cmf lib\server.mf build\server.jar build\server\*
D:\Developer\scjd\starting>java -jar server.jar
Failed to load Main-Class manifest attribute from
server.jar
Iam getting this error.
my server.mf contains
Main-Class: suncertify.server.RemoteServerManager
The default manifest file copies this content. still i have problem in running server.
pls respond asap.
Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Here is the .bat file that I had for making the jar files


In yours I didn't see where you included the manifest file.
Hope that helps
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Reshma Das
Ranch Hand

Joined: Jan 29, 2002
Posts: 125
D:\Developer\scjd\starting>jar -cvfm build\server.jar d:\developer\scjd\starting\lib\server.mf d:\de
added manifest

I did the same still iam getting error.
D:\Developer\scjd\starting>java -jar server.jar
Failed to load Main-Class manifest attribute from
server.jar
Is there any other way to do it.
My manifest.mf contains:
Manifest-Version: 1.0
Main-Class: suncertify.server.Server
Created-By: 1.3.1_01 (Sun Microsystems Inc.)
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Well the manifest file looks correct. But what directory do you have it stored in? and when you add it to the jar, does it put pathing in it?
You cn use a tool like Winzip to see that information.
The manifest file needs to not have any path in that jar file, meaning it is the root. Therefore the other classes have the path. In the manifest file the main class is "suncertify.server.Server"
Therefore it will look at/for a path of suncertify/server for a class called Server in the jar file.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in running server- problem with jar file