Solved

Jave Script:  3D Cube

Posted on 1998-06-29
27
293 Views
Last Modified: 2006-11-17
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?  
0
Comment
Question by:emudd
  • 15
  • 4
  • 4
  • +4
27 Comments
 

Author Comment

by:emudd
ID: 1844448
none, thank you
0
 
LVL 28

Expert Comment

by:sybe
ID: 1844449
what is the url to your page ?
0
 

Author Comment

by:emudd
ID: 1844450
0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1844451
Please post the Java source here, or put it somewhere on your page, and we will find the error.
0
 

Author Comment

by:emudd
ID: 1844452
 <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
 
LVL 6

Expert Comment

by:Holger101497
ID: 1844453
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
 

Author Comment

by:emudd
ID: 1844454
MS-VJ++
0
 

Author Comment

by:emudd
ID: 1844455
Edited text of question
0
 

Author Comment

by:emudd
ID: 1844456
Note I edited my original question because I could not cut and paste to fit in the reply box!


0
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1844457
Hi,, same as Holger's, my browser runs the applet just fine... What OS are you using?
0
 

Author Comment

by:emudd
ID: 1844458
Christian! I did not understand yesterday's comments/answer. OS=windows95?
0
 

Author Comment

by:emudd
ID: 1844459
(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
 
LVL 1

Expert Comment

by:rprice032897
ID: 1844460
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:emudd
ID: 1844461


             " 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
 

Author Comment

by:emudd
ID: 1844462
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
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1844463
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
 

Author Comment

by:emudd
ID: 1844464
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
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1844465
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
 

Author Comment

by:emudd
ID: 1844466
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
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1844467
just curious --- how did you solve the problem?
0
 

Author Comment

by:emudd
ID: 1844468
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
 
LVL 2

Expert Comment

by:duneram
ID: 1844469
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
 
LVL 2

Accepted Solution

by:
duneram earned 200 total points
ID: 1844470
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
 

Author Comment

by:emudd
ID: 1844471
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
 
LVL 2

Expert Comment

by:duneram
ID: 1844472
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
 
LVL 2

Expert Comment

by:duneram
ID: 1844473
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
 

Author Comment

by:emudd
ID: 1844474
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now