Link to home
Start Free TrialLog in
Avatar of emudd
emudd

asked on

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?  
Avatar of emudd
emudd

ASKER

none, thank you
Avatar of sybe
what is the url to your page ?
Please post the Java source here, or put it somewhere on your page, and we will find the error.
Avatar of emudd

ASKER

 <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>      
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...
Avatar of emudd

ASKER

MS-VJ++
Avatar of emudd

ASKER

Edited text of question
Avatar of emudd

ASKER

Note I edited my original question because I could not cut and paste to fit in the reply box!


Hi,, same as Holger's, my browser runs the applet just fine... What OS are you using?
Avatar of emudd

ASKER

Christian! I did not understand yesterday's comments/answer. OS=windows95?
Avatar of emudd

ASKER

(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>
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.
Avatar of emudd

ASKER



             " 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



Avatar of emudd

ASKER

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!
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.
Avatar of emudd

ASKER

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.
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
Avatar of emudd

ASKER

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!
just curious --- how did you solve the problem?
Avatar of emudd

ASKER

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.
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.  
ASKER CERTIFIED SOLUTION
Avatar of duneram
duneram

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

ASKER

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?
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


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


Avatar of emudd

ASKER

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