Jave Script: 3D Cube

I followed the directions -- I think -- on how to build a cube in my GeoCities WebPage. But when I try to view it on the
net, the Applet begins and then stalls and I get the following message:

Array index out of bounds exception.

I intended to send this entire message: is that wehat reached you?

             Christian meant the JAVA-source, of course... being your actual program - we can see how
             you embedded the applet by looking at the page source...
            I inserted the applet line by line

             Second:
             It's a cool applet and it does work for me! (consumes massive amounts of CPU-power!)
             Which browser/platform do you use?
            Explain uses "consumes massive amounts of CPU-power"
      `      My browser is Netscape 4.04
             Third:
             I recommend using applet viewer (from the JDK) rather than a browser - it will give you
             detailed error messages, including the line that caused the exception (of course, if you have
             an IDE like JBuilder or Symantec Visual Cafe, that's even better (I personally wouldn't rely on
             MS-VJ++ to produce code that runs on all browsers))
             If you use Netscape, you can open the Java console and type the numbers 0-9 to change the
             "debug level", i.e. the amount of information given about what your applet does or does not
             do...
             (from the JDK) where or what is JDK?
            What's an IDE?
             What's MS-VJ++
            Where is the Java console?







What is going on?  
emuddAsked:
Who is Participating?
 
duneramConnect With a Mentor Commented:
Thanks for the email.

Here is the cpu eating problem solution:

Check out my page at
      http://www.geocities.com/CapeCanaveral/Hangar/8802/phototest.html 

      This solves the eating of the CPU problem.  Let me know if this helps at all.
      Its a demonstration of thread starvation.  The sample Geocities tells everyone to use
      doesn't allow enough time for other programs on your computer to run.  the applet (3d cube) steals all of the computer's time, so no one else can run.  My fix solves the
      problem.  check those pages, and let me know if it helps.  
0
 
emuddAuthor Commented:
none, thank you
0
 
sybeCommented:
what is the url to your page ?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
emuddAuthor Commented:
0
 
Christian_WenzCommented:
Please post the Java source here, or put it somewhere on your page, and we will find the error.
0
 
emuddAuthor Commented:
 <PARAM name="url3" value="http://www.geocities.com">
                    <PARAM name="url4" value="http://www.geocities.com">
                    <PARAM name="url5" value="http://www.geocities.com">
                    </APPLET>      
0
 
Holger101497Commented:
First:
Christian meant the JAVA-source, of course... being your actual program - we can see how you embedded the applet by looking at the page source...

Second:
It's a cool applet and it does work for me! (consumes massive amounts of CPU-power!)
Which browser/platform do you use?

Third:
I recommend using applet viewer (from the JDK) rather than a browser - it will give you detailed error messages, including the line that caused the exception (of course, if you have an IDE like JBuilder or Symantec Visual Cafe, that's even better (I personally wouldn't rely on MS-VJ++ to produce code that runs on all browsers))
If you use Netscape, you can open the Java console and type the numbers 0-9 to change the "debug level", i.e. the amount of information given about what your applet does or does not do...
0
 
emuddAuthor Commented:
MS-VJ++
0
 
emuddAuthor Commented:
Edited text of question
0
 
emuddAuthor Commented:
Note I edited my original question because I could not cut and paste to fit in the reply box!


0
 
Christian_WenzCommented:
Hi,, same as Holger's, my browser runs the applet just fine... What OS are you using?
0
 
emuddAuthor Commented:
Christian! I did not understand yesterday's comments/answer. OS=windows95?
0
 
emuddAuthor Commented:
(from the JDK) where or what is JDK?
        What's an IDE?
        What's MS-VJ++
        Where is the Java console?

Can't you tell I need help??? <G>
0
 
rprice032897Commented:
An IDE is an Integrated Development Environment.

MS-J++ is Microsoft's application for generating non-standard Java code.  Try running JavaPureCheck on any class compiled with it for amazing numbers of errors.  I have had trouble getting some of it to run on browsers other than IE.

The Java Console is an area where Java messages can be seen.  The applet viewer and most browsers can be set to open it.

You should be able to find the same applet (and many others) at the HTML Oasis and Camel's Watering Hole.

http://www.htmloasis.com/00_FRAMESET.html

There's alot of stuff here including applets, animated gifs, javascripts, etc.  Check it out.
0
 
emuddAuthor Commented:


             " An IDE is an Integrated Development Environment. "

This means absolutely nothing to me!  Tell me more!  Menawhiile, I will check out
http://www.htmloasis.com/00_FRAMESET.html  but if it has anything to do with smoking -- I will boycott it!

regards,
  e



0
 
emuddAuthor Commented:
I think my coming her for help was a HUGE mistake. It seems as if y'all are just trying to show off your knowledge to each other, tossing out arcane (to an obvious beginner) knowledge. But thanks anyway -- enjoy!
0
 
Christian_WenzCommented:
take it easy...
problem here is, that noone of us can reproduce the error in your applet - it seems to run just fine. So we need more data on your equipment.
0
 
emuddAuthor Commented:
Thank you all for your help. I took it easy for three days. I solved the problem myself. I strongly advise that in the future you just use everyday words, no abbrevs. unless you're sure they are understandable. When you refer to IDEs
 and JavaPureCheckyou might a) define it b) tell the person whewre or how to find it.
0
 
Michel PlungjanIT ExpertCommented:
emudd: Please do net be offended if someone throws java specific terms in your direction if you ask a question involving a java specific error message.

If I go to a computershop and tell them my computer has problems accessing the harddiskcontroller after I flashed the bios, I expect them to speak jargon back to me...

If I however tell them I ran a weird program called fbios.exe I downloaded from a web site and I have no idea what it did, they will probably ask me if I knew what I was doing...

Since we do not know what the directions you need to follow on Geocity to build a cube, I believe we assumed you had problems getting Geocities to run an applet you wrote yourself using a programming tool called an Integrated Development Environment (IDE)  because you can write the code and compile and execute without leaving the code editor.

When a Java Program gives an error like you mentioned, Java programmers will want to see the actual source code of the Java program.

An applet  is a Java program written to run in a browser or in an applet viewer from among others, the company Sun)

Such a viewer comes with the Java Development Kit which is a set of programs and tools to help a Java programmer write Java programs.

Microsoft Visual J++ is an IDE used to write something not quite but almost totally unlike Java (just kidding - it is Microsofts development tool for Java)

JavaPureCheck is probably a tool that can look at the code and see if it conforms to the 100% pure Java specifications which were created to counter Microsofts not quite Java solution...

I do not think anybody was showing off, just trying to help a Java programmer.

So now we know that Geocities gives you the possibility of defining some HTML parameters for an applet THEY wrote, we can try again to solve your problem, but it seems you solved it yourself so you can save your points and come back and ask another question another time.

Enjoy,

Michel
0
 
emuddAuthor Commented:
Very nice! Thank you for all the explanation. However, please note, that I asked item by item for an explantion of the terms I did not understand. Next time I have a problem, I'll direct it to you!
0
 
Christian_WenzCommented:
just curious --- how did you solve the problem?
0
 
emuddAuthor Commented:
Well I received no help here as you know, so I finally wrote to GeoCities. Don't know what they did, but it works. Thaks for your interest.
0
 
duneramCommented:
Hi,

I have 1/2 an answer for you.  I just saw this thread and I ran into the same problem where the applet eats all the resources.  Check out my page at
http://www.geocities.com/CapeCanaveral/Hangar/8802/phototest.html

This solves the eating of the CPU problem.  Let me know if this helps at all.
Its a demonstration of thread starvation.  The sample Geocities tells everyone to use
doesn't allow enough time for other programs on your computer to run.  the applet (3d cube) steals all of the computer's time, so no one else can run.  My fix solves the problem.  check those pages, and let me know if it helps.  
0
 
emuddAuthor Commented:
I understood all that was said, since it was explained. Thank you

Unfortunately when I changed my sleeptime tfrom 5! to 231, all I now see is a solid black box. No cube. Fascinating what?

Is the cube not only an aplet but a cgi? So could my problems not be in the code but the source of the cgi?
0
 
duneramCommented:
Hi,

I went to your page http://www.geocities.com/Vienna/Strasse/7437/cube.html and it's working for me.  What version of your browser are you using? and what browser do you use?

I am using Netscape Communicator 4.01


0
 
duneramCommented:
Hi one more time,

I compared yours to mine and they are almost identical.  Either your computer or browser doesn't support the cube, or you just need to wait longer for it to load.

You page shows up fine when I go to it and watch the cube move.  And switching to 231 fixes the problem where it was hogging the CPU.  I am using  netscape version 4.01


0
 
emuddAuthor Commented:
I'm sure the cube was loaded as the bottom line shows progress and it reported that it was running. Much as I'm delighted by the sheer beauty of the cube, it's driving me wacky!

I truly appreciate your contiuned interest.

regards,
esmeralda
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.