Fun With Java

by Ray Dios Haque

I run a small chat room that is IRC-based and interfaced though a Java client.

One day a friend and I were attempting a chat.  He was having problems at the time with his TCP/IP protocol.  Rather than reinstall his protocol and his Dial-Up Networking, he found it rather fun to try surfing anyway.

I was on the phone with him when he said, "Hey I can open my mail! (chuckle), just mail the damn thing to me!"  Chuckling myself, it suddenly occurred to me that I could indeed mail the chat room to him.  We both use Yahoo! Mail, which as you should know, is a Java enhanced deal.  That way you get the look and feel of a real mail program.  So why not slide that chat room right in there with the e-mail?

I then viewed the source code for the chat room, and inserted a codebase line into the applet.  Applets can be run from their current directory in your webpage, or from another webpage entirely using the codebase line.  For example:

<applet code="ConferenceRoom.class" codebase="http://irc.webmaster.com/Java/" align="baseline" width="500" height="239" archive="http://irc.webmaster.com/Java/cr.zip" name="cr">

In the example you see that the codebase line has been inserted telling the applet that the class files are stored elsewhere.

Now I mailed him the chat room.

Moments later he opened the chat room and found me inside it.  But something else even greater happened.  The chat room loaded faster than anything we had ever seen before.  Why?  Because Yahoo!'s mail server had loaded the room for him!

Let me tell you something, Yahoo! has some mighty fast mail servers.  We're talking T3 action here!  This was neat, but it raised other curiosities.  What else would we like to see load faster?  I for one enjoy RealAudio and RealVideo, but the damn things lag out way to much and I get sick of seeing the Buffering (X Seconds) box.  Why not drop one of those in an e-mail?  Yes it will work, but there is a trick.

Typically you see RealVideo and RealAudio as a pop up box.  Meaning, you click on it, and the "Real" box pops up loading the clip you requested.  When you embed RealAudio or RealVideo, you make the source (the page you are on) load the clip for you.  The clip will appear as being fastened to the page.  So try dropping an embedded clip into an e-mail.  You should enjoy the results.

This gag also works well with NetShow (which also must be embedded to work).  Shortly before writing this article I watched a two hour Roy Rogers movie from www.westerns.com, and it never skipped a beat.  Even when I went into other windows and surfed, the buffering was damn near non-existent.

The hardest part is finding a page that embeds their NetShow, RealAudio or RealVideo, so that you can steal the source code.  Here is some sample codes (bullshit free, I have removed the stuff you don't need) that will help you write a nice e-mail for yourself:
<html> 
<td> 
<embed src="http://www.calpoly.edu/-rbendes/mtvblack56.ram" width="176" height="144" controls="ImageWindow" autostart="true" console="col1"> 
</td> 
</html>          

RealVideo & RealAudio

Of course, you will want to substitute the address I gave you for the one you wish to view.  This addy I included for the example is just some shitty Pearl Jam video.

Troubleshooting

Are you getting back an e-mail which just has the source code you inserted, and not the neat stuff you were hoping for?  You may have spaces or page breaks before the <HTML> tag in your e-mail.  Delete all spaces; Yahoo! is picky about this.

Did you enable HTML codes?  In Yahoo! Mail, there is a clickable box that you must check in order for your HTML commands to be used.

Are you getting a blank box (gray) in place of your RealAudio or RealVideo?  You may not have entered your source code correctly.  Make sure your link really exists, and that you have put in the full address including the: http://

Getting a security exception error?  Some people protect their Java and such so that it will only run to certain sources.  This is to keep you from running it elsewhere.  Very common for porn pages (laugh).  A nice way to trick the source is to open two windows in your browser.

Load the real page inside one window, and then stop the RealVideo from loading.  Then go to your mail program and restart the clip in there.  You will now have the RealAudio/RealVideo running in both windows, at lightning speeds.  Enjoy!

Return to $2600 Index