home *** CD-ROM | disk | FTP | other *** search
-
- GENERAL NOTES AND COMMON ERRORS SOLVING
-
-
- Here how to solve some common errors installing Java applets.
-
-
- You have to know that Java is supported by Netscape 2+, MS Explorer 3+ only
- on 32 bit operating systems (Windows 95/NT etc.), so you will not see java
- applets if running Windows 3.1, or a 16 bit browser: the alternate message
- will appear.
- Java is different from javascript: Java is made by .class files and is more
- powerful than javascript, that is a script/batch language written directly
- in .html document. Javascript is supported by Windows 3.1 (16 bit) too.
-
-
- --------------
-
-
- To install applets, you have simply to do this:
-
- 1) Copy the .class files on same dir of .html files, same as GIF and JPG
- images.
-
- 2) Add the <APPLET> tag in the html document, as explained in instructions.
- Some html editors don't permit this or have strange standards, in this
- case save the .html file, then edit it with dos edit, notepad or another
- text editor, and add manually the <APPLET> tag.
-
- 3) Upload .html file, .class files and other ones (images etc.) to your
- web page account as usual.
- Remember you have to upload with FTP with BINARY mode the .class files,
- not in ASCII mode!! Otherwise applets will not work.
-
-
- --------------
-
- Common errors:
-
- A) LONG FILENAMES TRUNCATION AND LETTER CASE CHANGE: Many MS-DOS users
- still use PKUNZIP to decompress zip archives, and haven't in mind the
- difference between FiLe.ExE, FILE.EXE and fILe.eXe.
- This is bad, for a couple of reasons.
- The first is "long file names" usage: msdos (and old 16 bit win 3.1
- programs) are able to support files 8 chars long with a suffix 3 chars
- long. Newer systems are able to support long file names, for example
- MyNiceApplet.class, that has a suffix of 4 chars.
- If you unzip with pkunzip the applets archives, or upload the .class
- files on the server with an old win 3.1 FTP program, etc., you will
- TRUNCATE the filename, and the result will be MYNICEAP.CLA !
- Then, remember to unzip with winzip 32 for win95 or similiar, and to
- copy/upload files with new programs that don't truncate filenames.
- Be careful on case of letters, too, since internet (unix) is case
- sensitive. So, write MyNiceApplet.class and not Myniceapplet.class,
- for example.
- Most common mistakes are on images filenames, since win95 is not case
- sensitive and it loads an image even if the case is different.
- For example, save an image as Image1.jpg, and you will be able to load
- it in netscape also if called as IMAGE1.JPG, image1.JPG, IMAGE1.jpg.
- This will not work online, so be sure the name of images you load from
- an applet is exactly the same.
-
- B) Wrong image sizes or applet size: read carefully instructions of the
- applets, since sometime images MUST be of fixed sizes (for example 64*64,
- 128*128 etc.) and don't enlarge too much applets, no more than 600 of
- width (since many people has 640*480 video modes).
-
-
- --------------
-
- Some Tips & Tricks
-
- Probably you are thinking: what people without java browsers will see
- instead of the applets?
- You can place an alternate text, or image, or a whole html segment:
-
-
- <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>
-
-
- So, for example, you can display a normal image if java is not present,
- otherwise a java manipulation of the image.
-
- If you want to read .class files from another dir, just use the codebase:
-
-
- <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 suppor Java.
- </applet>
-
-
- You can even load images for applets from a cgi-bin/ , maybe for pic of
- the day or similiar:
-
- <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>
-
- --------------
-
- Bug reports:
-
- - Don't save .JPG images from Adobe Photoshop 4 (especially with thumbnail),
- since some java implementations (Netscape 3) aren't able to read them.
- Use Photoshop 3, or another program, like Paint Shop Pro.
-
- - MS Explorer 3.02 (and some beta 4.0) have a bug, that cause a
- SecurityErrorException when java loads images from local Hard Disk.
- Applets will work when online, but will be hard to test offline, so get a
- newer version or a previous one (3.01 or 4.0 final).
-
- The URL for java explorer upgrade is:
-
- http://www.microsoft.com/java/vm/vmdownload.htm
-
-
- --------------
-
-
- What to do if the JAVA APPLET(s) uses 100% of CPU power, slows down the
- browser, or steal all the ram memory:
-
- A) When the applet is running, Netscape (or Explorer) slows down too much,
- and sometime even the Operating System (Win95, WinNT, MacOS etc.) hangs
- or slows down?
- Then you have to increase the MinSYNC parameter until the slow down
- disappear. This is set usually to 10, but you can set it to 20,40,60,100
- or more to decrease applet speed leaving CPU power to browser and OS.
- You can also decrease the "priority" parameter.
- Here an example of a more compatible setting:
-
- <param name=priority value="1">
- <param name=MinSYNC value="100">
-
- B) When the applet is running, after some seconds or minutes the memory is
- finishing and the hard disk starts swapping for virtual mem needs.
- In this case you are using a bugged version of netscape 3 / explorer 3,
- this problem is not present in fixed rel. 3 and rel. 4, but you can fix
- the bug decreasing memdelay to 10 - 16:
-
- <param name=memdelay value="15">
-
- C) I want to be sure that the applet(s) will run on all the browsers, even
- the old and bugged ones: this will decrease a lot the speed of the applet
- but I don't care, I prefer absolute compatibility:
-
- <param name=memdelay value="10">
- <param name=priority value="1">
- <param name=MinSYNC value="200">
-
- With these settings applets SHOULD work well on all browsers.
- Probably you can still find problems running WinNT on a slow 486
- computer, in this case MinSYNC must be set to 400 or more, but I hope
- there are no 33Mhz 486's running WinNT around the net.
-
-
- --------------
-
-
- PLEASE DON'T INSERT MORE THAN ONE APPLET EACH WEB PAGE.
-
- But, if you really want to place more than one applet per page, be
- sure to set priority parameter to 5 on all applets.
- Otherwise, if you want one to run faster and another to run slower,
- change their priority accordingly to your purposes.
-
-
- --------------
-
-
- SHAREWARE REGISTRATION
-
-
- If you really want to remove the linkware window (example: you are using
- applets in commercial sites or simply you can pay registration), you can
- REGISTER the applets paying to me US$ 30.
- This will encourage me keeping the development of new java applets and
- enhancing the old ones.
-
- Each registration code unlocks the applet only on a specified domain URL name,
- for example www.anfiteatro.it. With US$ 30 registration you can receive the
- registration code for 2 URL names: you must provide the url names and you
- will receive the registration codes for these urls (via e-mail).
- This can be useful to divide US$ 30 bill with a friend that will use the other
- regcode you don't need. In this case you will pay US$ 15 for a regcode instead
- of US$ 20 (this is the price for one only regcode).
-
- The registration code must be inserted in the "regcode" parameter, and it
- unlocks -ALL- the applets for registered URL domain name.
- Note that the applets will run as registered on all the pages of the site.
-
- Registered applets doesn't display the linkware window, and have the reglink
- and regnewframe parameters enabled: with these you can optionally specify a
- page where the applet will bring when clicked.
- The regnewframe determine if the link is opened in a new window frame or on
- same page of the applet, overwriting it.
- Note: some applets become more useful when registered, for example the CFade
- applet can become a banner, same for CubeMenu applet.
-
- If you want more or less than 2 regitration codes, here are the prices:
-
- reg. codes price
-
- 1 U$20
- 2 U$30
- 3 U$45
- 4 U$60
- 5 U$70
- 6 U$80
- 7 U$85
- 8 U$90
-
- You can't but more than 8 regcodes, except particular cases I can evaluate,
- otherwise people will resell my codes at lower prices (you can buy 8 codes
- at the price of 6, but I don't allow more than 2 codes gifted).
-
- For registration informations and instructions, go to this page:
-
- http://www.anfiteatro.it/javadev/registration.html
-
-
- --------------
-
-
- Fabio Ciucci 1997/98
-
- http://www.anfiteatro.it/java.html
-
-