This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NX:jar file path  RSS feed

 
guyue0505
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create a jar file like :
1)jar -cvfm client.jar manifest_client.mf suncertify\client\*.class suncertify\db\*.class
2)jar -cvfm server.jar manifest_server.mf suncertify\server\*.class suncertify\db\*.class
manifest_client.mf like:
Manifest-Version: 1.0
Created-By: 1.4.0 (Sun Microsystems Inc.)
Main-Class: suncertify.client.client
manifest_server.mf like:
Manifest-Version: 1.0
Created-By: 1.4.0 (Sun Microsystems Inc.)
Main-Class: suncertify.server.server
So i create client.jar and server.jar Ok;
and last i run like this:
java -jar sever.jar ; But some errors occurs:
Exception in thread "main" java.lang.NoClassDefFoundError: suncertify/server/ser
ver
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12148
255
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steven
Dont the new exams require you to have a single jar file named "runme.jar" for both client and server?
Even if you do have that requirement, I think we should ignore it for the moment, and try and solve your current problem. Otherwise you are likely to have the same problem when you try and meet the requirement.
OK, obvious questions first.
Can you run the server by running:

If you run the command
Do you get the response:
Regards, Andrew
[ June 24, 2003: Message edited by: Andrew Monkhouse ]
[ June 24, 2003: Message edited by: Andrew Monkhouse ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Steven"-
Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
All you need to do is to add your last name.
Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!