• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

error in running server- problem with jar file

 
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
 
ranger
Posts: 17346
11
Mac IntelliJ IDE 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
Posts: 17346
11
Mac IntelliJ IDE 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
 
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic