 
         |
System Requirements: Java is only supported
by Netscape versions 2 and higher, and MS Explorer versions 3 and higher on 32 bit
operating systems (Windows 95/NT etc.). Java applets will not appear on Windows 3.1, or a
16 bit browser. Instead you will see a message stating your browser does not support Java.
The Anfy Java wizard requires Win 95/NT.
Differences between Java and Javascript
Java is different from JavaScript: Java is made by creating .class files and is more
powerful than JavaScript (which is a script/batch language written directly inside a .html
document). JavaScript is supported by Windows 3.1, Java is not.
The Anfy Java package contains only Java applets.
How to add Java applets to html documents:
1) Copy the .class files to the same dir as the .html files, along with any GIF and JPG
images. In Anfy Java this can be done with the "Copy all files to" function.
2) Add the <applet> tag in the html document as shown in the instructions. Some html
editors do not allow this or have special standards. If this occurs, save the .html file
first, then edit it with dos edit, notepad or another ASCII text editor. Then manually add
the <applet> tag.
Anfy Java helps you create the <applet> tag with the right parameters for your
purposes and your images, but you still have to copy and paste the resulting
<applet> tag in your html document. You can use the "Copy all files to"
function to save an html document that contains only the applet, and then re-open it with
your preferred html editor to add what you want.
3) Upload the .html file, .class files and any others (images etc.) to your web page
directory as usual.
Please note that you have to upload the .class files using FTP in BINARY mode and not in
ASCII mode !! Otherwise the applets will not work (a "ClassFormat" or
"Method Verification" or "Bad Magic Number" error message will be
displayed).
Most common errors:
A) LONG FILENAMES TRUNCATION AND LETTER CASE CHANGE: Many MS-DOS
users are still using PKUNZIP to decompress zip archives, and do not take into
consideration the difference between FiLe.ExE, FILE.EXE and fILe.eXe. This is not good for
various reasons:
The first one is the use of long file names: msdos (and old 16 bit win 3.1 programs) are
only able to support file names with 8+3 characters.
Newer systems on the other hand support long file names, for example MyNiceApplet.class,
which has a suffix of 5 chars. If you use PKUNZIP to unzip the applet archives, or upload
the .class files on the server with an old Windows 3.1 FTP program or similar, you will
TRUNCATE the filename, and the result will be MYNICEAP.CLA !
Trying to run the applet will result in a "ClassNotFound" error displayed.
Ensure you unzip using "winzip 32" or similar in win95, and to copy/upload the
files with these newer programs that do not truncate the filenames.
Consider the case of the characters as well since many servers on the Internet (Unix) are
case sensitive.
For example, if the applet is named "MyNiceApplet.class" and you write
"Myniceapplet.class", the applet will not work. The most common mistakes are in
mismatched image filenames, because win95 is not case sensitive and it loads an image even
if the case is different.
For example, if you save an image as "image1.jpg" you will also be able to load
it from your local harddrive if you refer to it as IMAGE1.JPG, image1.JPG or IMAGE1.jpg.
But once you put it on your ISP's server it will only work if you refer to it as
image1.jpg.
Ensure the names of images you load from an applet are identical in case and characters.
B) Wrong image or applet size: read the instructions for the applet carefully because
images usually MUST be of fixed sizes (for example 64*64, 128*128 etc.). Do not enlarge
the applets too much, and images more than a width of 600 pixels, will not be fully
visible to those using a video mode of 640*480 pixels.
In most cases, Anfy Java can detect an incorrect image or applet size, and this will help
prevent one of the most common errors.
Less common errors:
A) "Using Netscape Gold 3, the applets work offline but fail
to work online, displaying a "NullPointerException" or similiar error."
This is a bug in the browser that randomly appears.If this occurs, try reloading, clearing
the cache, or in rare cases deleting the cache files manually from netscape cache
directory. Similar "NullPointer" error messages happen occasionally on Netscape
4.04.
However, visitors will have no problems seeing the applet.
B) "I updated all the class files on my GEOCITIES site, and when I reloaded the page
I got an error message (NoClassDefFoundException) in applets". This is a temporary
problem generated by Geocities and some other sites. If you reload the page after a couple
of minutes, the applets will run correctly.
C) "I am using the AOL browser, and everything else on page would appear but the
applet. Instead there was a message -Loading image-, and the image never appeared, just a
gray rectangle".
In this case, you have to turn off graphics compression in the AOL internet browser
preferences as follows:
On the AOL Toolbar, click Members, Click Preferences, Click WWW Icon (Picture of world
globe), and you will see a dialog box. Click the "Web Graphics" tab, and a page
appears with the question "Do you want Web Graphics to be compressed. This will
display pages faster"; under the question is a box that you "check" if you
want compression, otherwise leave it blank. If it is checked, clear it.
Tips & Tricks:
You may be thinking, "What will people without Java browsers
see instead of the applet ?" You can specify an alternate text, image, or a whole
html segment to be used instead of the applet:
<applet code="MyApplet.class" width=150 height=150>
<param name=param1 value="1234">
<param name=param2 value="5678">
<IMG ALT="*" ALIGN=center SRC="alternateimage.gif" border=0>
</applet>
You can even load images for applets from a cgi-bin/ dir, maybe a 'pic of the day' cgi or
similar:
<applet code="MyApplet.class" width=150 height=150>
<param name=image value="/cgi-bin/Image.cgi">
<param name=param2 value="5678">
<IMG ALT="*" ALIGN=center SRC="/cgi-bin/Image.cgi" border=0>
</applet>
So, you can display a normal image if Java is not present, rather than Java manipulations
of the image if Java is present. In the Anfy Java program, you can enter this alternate
text or html in the "For no java browser" field.
If you want to read .class files from another dir or path, just use the codebase tag:
<applet codebase="http://www.app.com/app/" code="MyApplet.class"
width=150 height=150>
<param name=param1 value="1234">
<param name=param2 value="5678">
Sorry, your browser doesn't support Java.
</applet>
Bug reports:
- Don't save .JPG images from Adobe PhotoShop 4 with
"thumbnail" option enabled, because some Java implementations (Netscape 3) will
not be able to read them. Disable thumbnail feature or use PhotoShop 3.
- MS Explorer 3.02 (and some beta 4.0 versions) have a bug that causes a
SecurityErrorException when Java loads images from the local Hard Disk.
Applets will work when you are online, but will be hard to test offline, so get a newer or
older version (3.01 or 4.0 final for example).
The URL for Java explorer upgrade is http://www.microsoft.com/java/vm/vmdownload.htm.
Frontpage users:
Here is an example of the configuration steps for the Anfy Water
applet (useful for non frontpage users too):
1) If you don't have already an image, use Image Composer ( FrontPage's Tool ) to create
and save an image as "water.gif" for example,.
2) In the Anfy Java main screen, select WATER, press the NEXT button, then press
"browse" button and choose your image for the effect. Then press the NEXT button
4 times, and use the publish function "Copy all files to" to save all the needed
files in a new folder.
3) In FrontPage Explorer, import the Java Applets, including anwater.html, anfy.class,
AnWater.class , Lware.class, and waterscr.txt. In other words, these files must be present
in same folder (directory) as the html document you will edit.
4) In FrontPage Editor, open anwater.html, then select the applet and click copy button on
the toolbar.
5) Open a new web page, or the document where you want to insert the applet, and click the
paste button on the toolbar.
This should configure the applet to work. If you want to change parameters, double click
the applet, and you can open "Java Applet Properties" box.
You may have directory problems on the server, because FrontPage requires a web server and
forces you to import the .class libraries onto the web.
If you copy them into the web directories, then you have to put them in the right place
and select "Recalculate Hyperlinks" in the explorer. Then you have to make sure
the applets parameter point to the applet properly.
Note: to change the scrolltext, you have to modify the waterscr.txt content
Compatibility parameters:
PREFACE: Many people think Java is dangerous, not
secure, and crashes a lot of browsers. This is true for poorly programmed applets and
pages overloaded with 10 applets, and on old computers.
If you use Anfy Java applets with "Optimize for compatibility" settings, placing
NO MORE than one applet each html page or just about any browser will crash.
What do I do if the JAVA APPLET(s) uses 100% of my CPU power, slows down the browser, or
steals all my available memory ?
A) When the applet is running, Netscape or Explorer may slow down, and sometimes
the Operating System (Win95, WinNT, MacOS etc.) hangs or slows down as well.
In this happens you have to increase the MinSYNC parameter until the system operates
normally. This value is usually set to 10, but you can set it to 20,40,60,100 or even more
to lower the applet speed and thus leaving CPU power to the browser and OS. You can also
decrease the "priority" parameter.
B) When the applet has been running for some seconds or minutes memory runs out and the
hard disk starts spinning (the OS is using it's swap file to simulate more memory).
If this happens, you are most likely using a version of Netscape 3 / MS Explorer 3 w/bugs.
This problem is not present in the fixed rel. 3 and rel. 4, but you can fix the problem by
decreasing memdelay to 10 - 16:
Anfy Java provides 3 predefined settings in the expert mode panel: Standard settings will
set MinSYNC to 10 and priority to 3, and this is acceptable for 99% of browsers.
If you want to ensure the applet will run even in bugged versions of Explorer and Netscape
and you don't care if the applets run much slower, select the Optimize for compatibility
option. This will set MinSYNC to 30, priority to 1 and memdelay to 15.
If you want to pump the applets to the max, and don't care if this will hit older browsers
and slow their CPU dramatically, select Optimize for speed. This places a MinSYNC value of
2 and a task priority of 6.
It is possible to manually set MinSYNC to 0 and priority to 10, for those who want to test
the applet in full speed on a P200MMX or Pentium II.
Remember,the most important guideline :
DON'T INSERT MORE THAN ONE APPLET ON EACH PAGE
If you really MUST place more than one applet per page (do so at your own risk!), be sure
to set the priority parameter to 5 on all applets. If you want one to run faster than
another, change their priority to match your desired speeds. |