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.
-
-
- --------------
-
- 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, since some java
- implementations aren't able to read them. Use Photoshop 3, or another
- program, like Paint Shop Pro.
-
- - MS Explorer 3.02 has 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 them, so get a newer version or a previous one (3.01).
-
- The URL for java explorer upgrade is:
-
- http://www.microsoft.com/java/download/vmdownload.htm
-
- --------------
-
-
- Fabio Ciucci 1997
-
- http://www.anfiteatro.it/java.html
-