Link to home
Start Free TrialLog in
Avatar of CarolClark
CarolClark

asked on

Exception-ally clueless

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
Avatar of CarolClark
CarolClark

ASKER

Edited text of question
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.
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
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
I must not be understanding this at all... my code looks fine (to my eyes)...

Carol
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
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
I think yoren deserves the points there, even though he(/she) was a little vague. The concept was right!!
Okay, jdyer... the points go to yoren!

Carol
ASKER CERTIFIED SOLUTION
Avatar of yoren
yoren

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!

Carol