The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by marcoe08]

Hi,
I'm using Windows 2000. I built the code for Chapter 3 but I can't run the
server.jar file. When I try to do so I got the following message:

Failed to load Main-Class manifest attribute from server.jar

Do you where the problem is?
or can you give a guideline on how to run the code on Windows?
(on page 122 you mentioned a .bat file, I didn't see any)

Regards,
Marco Escobedo
import-bot (20211) [Avatar] Offline
#2
Re: Running jar files
[Originally posted by iainshigeoka]

Hi,

Sorry about that. I keep forgetting to get those batch files in there. It's
really simple though. Try this to start the server (in a batch file in the
bin directory):

@echo off
java -cp jabber.jar;server.jar;....libxerces.jar com.metamech.vorpal.Server

The client class name varies from chapter to chapter but the general format is
(example for chp 4):

@echo off
java -cp jabber.jar;client.jar;....libxerces.jar
com.metamech.wocky.SimpleMessageClient

Let me know if you still have problems.

-iain
import-bot (20211) [Avatar] Offline
#3
Re: Running jar files
[Originally posted by iainshigeoka]

Oops. Looks like the forum software automatically replaces back slashes with
dots.

> @echo off
> java -cp jabber.jar;server.jar;....libxerces.jar com.metamech.vorpal.Server

that should be ..<backslash>lib<backslash>xerces.jar

Just out of curiosity, would you have preferred it to have used an "executable
jar" or is a startup script better. Executable jars are nice in that you can
just double click on them, but start up scripts usually make it easier to see
what's going on "under the covers".

-iain
import-bot (20211) [Avatar] Offline
#4
Re: Running jar files
[Originally posted by marcoe08]

It worked!! Thanks for your help...
I think the scripts are good because, as you mentioned, one can know what's
going on under covers.

Marco