| Author |
Carls Trusiak -post
|
sunil choudhary
Ranch Hand
Joined: Nov 10, 2000
Posts: 138
|
|
while I was trying to run Carls post at http://www.javaranch.com/ubb/Forum8/HTML/000181.html I did get the MyServer and MyClient working but the client catches an exception while running this is how I went about ---- First I run the MyServer.java // o/p-server listening to port 2000 then I run MyClient //the appletviewer window does show two textfields and a connect button. I fill a garbage value in empty textfield and press contect the client is giving a Null pointer exception. Can Carl or someone else may point out what am I doing wrong?? Please ... Sunil (if you wish, I can send you the code by mail.)
|
----------------------------------<br />"Learning is weightless, a treasure you can always carry easily."<br />-Chinese Proverb
|
 |
Carl Trusiak
Sheriff
Joined: Jun 13, 2000
Posts: 3340
|
|
You have to run this using a browser. AppletViewer doesn't implement the CodeBase so, the getCodeBase() causes a null pointer exception. If you wish to use appletviewer, get the IP address where you are runnung the server app and replace the call to getCodeBase with that. If your running it on the same machine, it's usually 127.0.0.1
|
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
|
 |
 |
|
|
subject: Carls Trusiak -post
|
|
|