Solved

Exception-ally clueless

Posted on 1998-08-16
11
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

728 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