#### Archived

This topic is now archived and is closed to further replies.

This topic is 6450 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''m working on a tetris Java applet, and my first little applet to get things rolling is a simple panel that has a block drop. I coded this up in JBuilder 3.5 Foundation. After compilation and all that good stuff, I ran it and it works. The problem now is trying to get it to load on a webpage. I put together a little .html file, but the applet won''t load when I try to view the file with Netscape. That same file works when I use appletviewer in my dos prompt, so that confuses me even more. Also, I''ve looked at other people''s websites with their applets, and copied their code over, and it still didn''t work! I do have the class and the html file in the same folder, too. I''ll post a link to my html file, I figure there must be something butt simple that I''m missing, but this has stumped me for a few hours now. http://derekdaz.homepage.com/applet.html also, you can view my code at http://derekdaz.homepage.com/Double.java Req dddDDDdddDDDdddDDDdddDDDddd Big Brother is Watching

##### Share on other sites
One more thing, on the Java console it says this when I try to load up the page:

at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code) at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)

Req

##### Share on other sites
Hi,

I once had the exact same problem has you have and I were baffled for a whole day. I looked at your code and the reason is the same:

1. You have been using Java 1.2. Netscape and Internet Explorer only supports Java 1.1 - even in the newest versions.
2. You are using Swing. Netscape and Internet explorer do not support Swing.

The appletviewer does not have these problems which is why it works here.

You now have several alternate ways of solving the problem:
1. Rewrite your program in Java 1.1 without Swing.
2. Rewrite your program to Java 1.1 with Swing (now in package com.sun.swing.* as far as I remember) and include the file swing.jar fra the swing kit for Java 1.1 as an archive for your project. This works but the jar file is almost 2MB large which makes it a big download for an applet.
3. Require that the user installs the Sun Java 1.2 plug-in from their site and then change your html page using the free Sun html-converter so the html directs the browser to use the plug-in. The drawback is that the plug-in does not exist on all platforms so you loose plarform portability.

I usually go for solution 1, as this is what makes it easiest for the user.

Jacob Marner

##### Share on other sites
IE and Netscape only support Java 1.1!? What the...! What gives with that?

E:cb woof!

##### Share on other sites
Jacob!

You''re a life saver! Thanks a lot. I had originally started off with the java plugin requirement, but I think that the code I used for that was buggy or something.

Again, thanks! If I had some cookies, I''d give them to ya!

Take care
Req

dddDDDdddDDDdddDDDdddDDDddd

Big Brother is Watching

##### Share on other sites
You are welcome.

By the way. I do not think that it is surprise that the browsers do not support Java 1.2 (or 1.3!).

First Internet Explorer is made by Microsoft and we know how Microsoft feels about Sun. Why should they support Java more than half-hearted. If people see that java gives problems they will stop using Java, not internet explorer. Microsoft wins the dirty way.

Second Netscape has not come with any releases for quite some time. Java 1.1 was supported from Netscape 4.5 and the current full version is 4.72. A prerelease of netscape 6 has just come and it might be that it supports a newer java version.

Jacob Marner