I created a Java applet program and compiled it. As a result of the compilation, it generated a class
file. But, it showed the following warning message while running the applet with the command prompt using the appletviewer
command.
D:\Applets\Applets>appletviewer FirstApplet.java
Warning: Can't read AppletViewer properties file: C:eswaran_s.VMSPL\.hotjava\properties Using defaults.
When I run this command once again, it does not show the warning message, but the applet is not running.
How can I solve this issue?
Shoutout to RAB teaching broken code (Applets have been deprecated in most browsers)
I had the same problem following the instructions for a similar tutorial from Oracle's Java: A Beginner's Guide - Sixth Edition (pg 515). The directions tell you to immediately run the .java file with the applet viewer. However, you must first compile it. So, C:>javac FirstApplet.java. This will compile the program and create your FirstApplet class file, which is what is currently missing from your execution. Then, C:>appletviewer FirstApplet.java. Your applet should run fine. Seems odd that the tutorial would leave out this instruction.