• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error in running server- problem with jar file

 
Reshma Das
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Reshma Das
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic