Solved

Exception-ally clueless

Posted on 1998-08-16
11
207 Views
Last Modified: 2010-03-30
I've adapted a couple of applets and get NullPointerException on one and NumberFormatException on the other.  I've looked over the code in both and don't have a clue what's wrong.  The gifs, html and classes for each applet are in its own separate folder.

Help?

Here's the html for each one:

<html>

<head>
<title>Perception</title>
</head>

<body>
<applet code="SlideShowFade.class" width="100" height="100">
  <param name="NumImages" value="15">
  <param name="FadeSize" value="15">
  <param name="DelayBetweenFades" value="150">
  <param name="DelayBetweenImages" value="7">
  <param name="Controls" value="true">
  <param name="Image1" value="world01.gif">
  <param name="Image2" value="world02.gif">
  <param name="Image3" value="world03.gif">
  <param name="Image4" value="world04.gif">
  <param name="Image5" value="world05.gif">
  <param name="Image6" value="world06.gif">
  <param name="Image7" value="world07.gif">
  <param name="Image8" value="world08.gif">
  <param name="Image9" value="world09.gif">
  <param name="Image10" value="world10.gif">
  <param name="Image11" value="world11.gif">
  <param name="Image12" value="world12.gif">
  <param name="Image13" value="world13.gif">
  <param name="Image14" value="world14.gif">
  <param name="Image15" value="world15.gif">
  <param name="AutoPlay" value="true">
  <param name="Sound01" value="mac.au">
  <param name="Sound02" value="mac.au">
  <param name="Sound03" value="mac.au">
  <param name="Sound04" value="mac.au">
  <param name="Sound05" value="mac.au">
  <param name="Sound06" value="mac.au">
  <param name="Sound07" value="mac.au">
  <param name="Sound08" value="mac.au">
  <param name="Sound09" value="mac.au">
  <param name="Sound10" value="mac.au">
  <param name="Sound11" value="mac.au">
  <param name="Sound12" value="mac.au">
  <param name="Sound13" value="mac.au">
  <param name="Sound14" value="mac.au">
  <param name="Sound15" value="mac.au">
</applet>
</body>
</html>

and...

<html>



<head>

<title>Perception</title>

</head>



<body>

<applet code="bookflip.class" width=100 height=100>

<param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">

<param name=res value="1">

<param name=image1 value="world01.gif">

<param name=link1 value="NO">

<param name=statusmsg1 value="">

<param name=flip1 value="">

<param name=image2 value="world02.gif">

<param name=link2 value="NO">

<param name=statusmsg2 value="">

<param name=flip2 value="">

<param name=image3 value="world03.gif">

<param name=link3 value="NO">

<param name=statusmsg3 value="">

<param name=flip3 value="">

<param name=image4 value="world04.gif">

<param name=link4 value="NO">

<param name=statusmsg4 value="">

<param name=flip4 value="">

<param name=image5 value="world05.gif">

<param name=link5 value="NO">

<param name=statusmsg5 value="">

<param name=flip5 value="">

<param name=image6 value="world06.gif">

<param name=link6 value="NO">

<param name=statusmsg6 value="">

<param name=flip6 value="">

<param name=image7 value="world07.gif">

<param name=link7 value="NO">

<param name=statusmsg7 value="">

<param name=flip7 value="">

<param name=image8 value="world08.gif">

<param name=link8 value="NO">

<param name=statusmsg8 value="">

<param name=flip8 value="">

<param name=image9 value="world09.gif">

<param name=link9 value="NO">

<param name=statusmsg9 value="">

<param name=flip9 value="">

<param name=image10 value="world10.gif">

<param name=link10 value="NO">

<param name=statusmsg10 value="">

<param name=flip10 value="">

<param name=image11 value="world11.gif">

<param name=link11 value="NO">

<param name=statusmsg11 value="">

<param name=flip11 value="">

<param name=image12 value="world12.gif">

<param name=link12 value="NO">

<param name=statusmsg12 value="">

<param name=flip12 value="">

<param name=image13 value="world13.gif">

<param name=link13 value="NO">

<param name=statusmsg13 value="">

<param name=flip13 value="">

<param name=image14 value="world14.gif">

<param name=link14 value="NO">

<param name=statusmsg14 value="">

<param name=flip14 value="0">

<param name=speed value="4">

<param name=pause value="1000">

<param name=extrah value="80">

<param name=flipcurve value="2">

<param name=shading value="0">

<param name=backR value="255">

<param name=backG value="255">

<param name=backB value="255">

<param name=overimg value="NO">

<param name=overimgX value="0">

<param name=overimgY value="0">

<param name=regcode value="NO">

<param name=regnewframe value="NO">

<param name=regframename value="_blank">

<param name=memdelay value="1000">

<param name=priority value="3">

<param name=MinSYNC value="10">

Sorry, your browser doesn't suppor Java.

</applet>

</p>



<p align="center"><br>

</p>



</body>

</html>

Thanks!

Carol
0
Comment
Question by:CarolClark
11 Comments
 

Author Comment

by:CarolClark
ID: 1220026
Edited text of question
0
 
LVL 7

Expert Comment

by:yoren
ID: 1220027
Looks like you may not have the source to the Java applets. Do you? NullPointerException means that somewhere in the Java code there's a pointer that is supposed to point to something but doesn't. That could be a missing or unreadable GIF.

One not-very-technical way to troubleshoot this would be to remove as many slides as possible until it works, then add them in 1 at a time.
0
 

Author Comment

by:CarolClark
ID: 1220028
Thanks for responding, yoren.  Yes, I have all the gifs... and they're all in the same file folder as the html and the classes.

What does NumberFormatException mean?

Thanks.

Carol
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 7

Expert Comment

by:yoren
ID: 1220029
NumberFormatException means the applet was likely expecting a number in one of the parameters, and you passed it something other than a number.

Cheers,

Yuval
0
 

Author Comment

by:CarolClark
ID: 1220030
I must not be understanding this at all... my code looks fine (to my eyes)...

Carol
0
 
LVL 2

Expert Comment

by:threshold
ID: 1220031
if...
     int i=Integer.parseInt("123"),
it's OK...

But
     int i=Integer.parseInt("123a")
It will raise NumberFormatException

I think there are something wrong in you applet reading the params
0
 

Author Comment

by:CarolClark
ID: 1220032
Thanks, threshold.  Well, sounds like the problem's in the classes, then (which I got from the original authors of these applets).  Back to the drawing board.

Carol
0
 
LVL 1

Expert Comment

by:jdyer
ID: 1220033
I think yoren deserves the points there, even though he(/she) was a little vague. The concept was right!!
0
 

Author Comment

by:CarolClark
ID: 1220034
Okay, jdyer... the points go to yoren!

Carol
0
 
LVL 7

Accepted Solution

by:
yoren earned 50 total points
ID: 1220035
Jdyer, thanks for the clarification. Yeah, that's what I meant, but I wasn't totally comprehensible. Hope we've helped, Carol

Yuval (He)
0
 

Author Comment

by:CarolClark
ID: 1220036
Thanks!

Carol
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error in @AspectJ Based AOP with Spring 2 18
throw exception 21 58
What's wrong with this code? 4 26
ejb message driven bean mdb creation steps 2 23
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question