Solved

Exception-ally clueless

Posted on 1998-08-16
11
210 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java exception bubble up 2 26
Eclipse for Java EE development 2 67
Java class and jar 3 58
convert Absolute path to relative path of FTP location 7 49
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

737 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