01.02.2013 Views

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

And a quick test...<br />

Now that both the client and server are implemented it’s time to make sure<br />

things work. No s<strong>of</strong>tware can go out without testing so...<br />

1<br />

The “-d” tells the<br />

java compiler to<br />

put the classes in<br />

the bin directory.<br />

2<br />

3<br />

Here’s our<br />

PokeReceiver<br />

instance.<br />

First compile and start up the MusicServer.<br />

File Edit Window Help Buildin’<br />

hfsd> mkdir bin<br />

hfsd> javac -d bin src\headfirst\sd\chapter6\*.java<br />

hfsd> java -cp bin headfirst.sd.chapter6.MusicServer<br />

Then start the new BeatBox—we’ll need two instances running so<br />

we can test the Poke.<br />

File Edit Window Help Ouch<br />

hfsd> java -cp bin headfirst.sd.chapter6.BeatBox PokeReceiver<br />

File Edit Window Help Hah<br />

hfsd> java -cp bin headfirst.sd.chapter6.BeatBox PokeSender<br />

Now send <strong>of</strong>f a Poke by clicking the “Send Poke” button on the instance<br />

we named PokeSender.<br />

Excellent!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!