Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Unable to run an applet with appletviewer

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am unable to run any applets using appletviewer. This code is from the book "SAMS Teach Yourself Java in 24 hours".
This is the environment as shown by the MS-DOS SET command:
CLASSPATH = .;D:\jdk1.3.1\lib;D:\jdk1.3.
This is the source code (Downloaded from
import java.awt.*;
public class RootApplet extends javax.swing.JApplet {
int number;
public void init() {
number = 225;
public void paint(Graphics screen) {
Graphics2D screen2D = (Graphics2D) screen;
screen2D.drawString("The square root of " +
number +
" is " +
Math.sqrt(number), 5, 50);
The compile generates no errors, but this is the result when I run it:
D:\SamsJava>appletviewer RootApplet.html
Exception in thread "main" java.util.MissingResourceException: Cant find
resource for bundle sun.applet.resources.MsgAppletViewer, key
at java.util.ResourceBundle.getObject(
at java.util.ResourceBundle.getString(
at sun.applet.AppletPanel.showAppletStatus(
at sun.applet.AppletPanel.init(
at sun.applet.AppletViewer.<init>(
at sun.applet.AppletViewer.parse(
at sun.applet.AppletViewer.parse(
at sun.applet.Main.main(

Is anyone able to shed some light on this?
I have re-installed jdk1.3.1 but that made no difference.
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic