Prentice Hall PTR Interactive banner logo
Curve Line

Java Multimedia Cyber Classroom, 1/E

Technical Report


WINDOWS TASK BAR
PROBLEM WITH FONTS
PROBLEM RUNNING THE APPLETS
PROBLEM WITH CAFE LITE
DOUBLE-CLICKING ON A MICROSOFT
    WORD FILE OPENS FRAMEVIEWER




WINDOWS TASK BAR

The Windows Task Bar, if set to "Always on top", will cause the Cyber Classroom windows to resize, obscuring icons along the bottom of the Cyber Classroom screen. Be sure that the "Always on top" property is turned off, or that "Auto hide" is turned on if "Always on top" is also turned on.


PROBLEM WITH FONTS

If the text appears unreadable when you launch the Cyber Classroom, or if you see an error message which indicates that the Cyber Classroom uses fonts that are not available on your system, do the following:

  1. Enter the Windows Control Panel
  2. Click on the Fonts icon
  3. Select View, then Options from the drop down menu
  4. Press the TrueType tab
  5. Check the box to display only TrueType fonts
  6. Press OK and restart the Cyber Classroom

PROBLEMS RUNNING THE JAVA PROGRAMS

The Java programs, applets, and applications included in the Cyber Classroom may fail to execute when you press the Execute icon. They may fail for four separate reasons:

16-Bit Drivers --------------

If the appletviewer or java window opens when you press the Execute icon, but the applet or application fails to run, then your system is using older, 16-bit CD-ROM drivers. These older drivers truncate the long filenames (.class and .html) of java programs making it impossible for the java virtual machine to find and execute them.

You can determine whether or not you have 16-bit drivers on your system by listing the contents of the directories on the CD-ROM that contain the code samples. These are in the subdirectories in the \jhtp\code directory. If they are listed by Windows Explorer with ".jav" or ".cla" extensions, then you have 16-bit drivers.If this is the case, contact your system manufacturer and ask for updated, 32-bit Windows 95 drivers.

JDK 1.0 --------------

On some systems, the Java programs fail to run when you press the execute icon and you see the following error message:

Appletviewer



     This program has performed an illegal operation



     and will be shut down.



     If the problem persists, contact the program



     vendor.

This is a problem in the version of the JDK that is installed during the CafeLite installation. There are two potential fixes. You may see this message if your video card is set for greater than 256 colors. If this is the case, reset it for 256 colors and try to execute the applets. On most systems that have this problem, resetting the number of colors to 256 will correct the problem.

If this does not correct the problem, then you must remove CafeLite from your system. Be sure to remove the following CafeLite environment variables from your autoexec.bat file:

SET CLASSPATH=.;d:\CafeLite\JAVA\LIB\CLASSES.ZIP



SET HOMEDRIVE=d:



SET HOMEPATH=\CafeLite\JAVA



SET JAVA_HOME=d:\CafeLite\JAVA

Reboot your system and the programs will execute correctly.

Note that you do not need CafeLite to compile and run your Java programs. You can do this with the java compiler (java\bin\javac) supplied with the Java Development Kit installed with the Cyber Classroom.

TCP/IP Stack Required ---------------------

Java is a networked programming language. Some of the objects defined in the Java Class Libraries require that a TCP/IP stack be loaded in order to execute properly. This is true of the applets in chapters 14 and 16. If you are working on a standalone system that is not connected to a network or that does not have dial-up networking configured, these applets will open but they will not execute properly.

MS-DOS Shell Properties ----------------------

Java programs that write to the system console will work correctly from within the Cyber Classroom only if the "Suggest MS-DOS mode as necessary" property is set for your MS-DOS sessions. This is the default setting, so unless you've changed it, this property will be set correctly.

To set this property, do the following:

  1. Right-click on the MS-DOS prompt icon. On most systems, this icon is available under the Start Menu. To access it, right-click on the Start button and select Open. Double-click on the Programs icon, and right-click on the MS-DOS Prompt icon.

  2. Select Properties from the pop-up menu, and select the Program tab.

  3. Press the Advanced button.

  4. Check "Suggest MS-DOS mode as necessary" and press OK. Return to the Cyber Classroom and execute the program.


PROBLEM WITH CAFE LITE

On some systems, the java source files appear to Cafe Lite to have filenames in all uppercase when they are copied to the hard disk from the Cyber Classroom. However, the filenaming convention used for these files uses initial caps in the significant portions of the name. For example, the name of the program in chapter 11 that demonstrates how to create a canvas is CreatCanvas.java. It may appear to Cafe Lite as CREATECANVAS.JAVA.

On systems where the filename appears to Cafe Lite in all uppercase, Cafe Lite will generate an error message like the following when you attempt to compile one of these files:

Public class CreateCanvas must be defined in a 



   file called "CreateCanvas.java".

This error message is generated because in the java source file itself the public class is named "CreateCanvas". Java's convention is that the public class must be declared in a file of exactly the same name, and with a .java extension. Because Cafe Lite sees CREATECLASS.JAVA and not CreateClass.java, it complains that the correct .java file is not present.

To correct this problem, do the following:

  1. Go to Windows Explorer and locate the .java file you are attempting to compile.

  2. Right click on the file, select Rename and rename the file with the correct capitalization. In the case of CREATECANVAS.JAVA, you would rename it to CreateCanvas.java.

  3. In Cafe Lite, open the Project Window by selecting Window->Goto View->Project.

  4. Click CREATECANVAS.JAVA in the Project Window with your right mouse button and select Remove.

  5. Select Edit from the Project menu in Cafe Lite, and add CreateCanvas.java to your project.

Your project will compile correctly.


DOUBLE-CLICKING ON A
MICROSOFT WORD FILE OPENS FRAMEVIEWER

There is a bug in the FrameViewer installation program that causes the .doc extension to become associated with FrameViewer under Windows 95; double-clicking on a Microsoft Word file will cause FrameViewer to open, and generate an error that the file cannot be opened. This can be fixed by reassociating the .doc extension with MS Word:

  1. From the Start menu, open Programs, then Windows Explorer.

  2. Choose View, then Options.

  3. Click on the tab for File Types, and scroll down the list until you find the entry for "Microsoft Word Document". Highlight it and click on Edit.

  4. Select the action for Open, and click on Edit again.

  5. Where it reads "Application used to perform action:", type the following command exactly, including quotations:

    C:\MSOffice\Winword\Winword.exe "%1"

    ***NOTE: If Microsoft Word is installed independently of Microsoft Office, remove the reference to "MSOffice\".

  6. Click on OK. The .doc extension should once again be associated with MS Word.



PTRI logoReturn to Prentice Hall PTR Interactive

© Prentice-Hall, Inc. A Simon & Schuster Company Upper Saddle River, New Jersey 07458