Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Unable to run an applet with appletviewer

Posts: 1
  • Mark post as helpful
  • send pies
  • 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.
Hey cool! They got a blimp! But I have a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic