Solved

Applet not running for most users

Posted on 2003-11-20
9
380 Views
Last Modified: 2010-03-31
I recently entered the world of applet creation. My applets run just fine on my machine, and on several friends' machines. However, for the vast majority of users, apparently regardless of OS and browser, they do not work.

I'm compiling my applet using Sun's JDK, and I've tried versions 1.2.2, 1.3.1_05, and 1.4.0_03. It doesn't seem to make any difference. Note that most users who CAN see my applet, are in the same Comp Sci classes as me, and have installed Sun's JDK themselves.

I created a version of my page that prompts users to download the JRE, and if they download it, all my applets DO work. However this is a huge hassle for users and it seems like it should be unnecessary; there's an awful lot of applets online that already work for nearly all users without requiring that download.

Should I be using a different compiler/different SDK? Perhaps different compiler options? I've already told the compiler to target an earlier version, and that didn't make any difference.
0
Comment
Question by:Sowelu
[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
  • 5
  • 3
9 Comments
 

Author Comment

by:Sowelu
ID: 9792010
Some clarification:
For users that the applet does not run, they get the error "load: class RunAlpha not found", where RunAlpha is my class. They get a grey box in place of the applet. Of course, the class does exist, and people with the JRE can load it. Apparently this is Java's standard "I don't like that file" error message.
I have attempted to compile under jdk1.1.8 but my program will not compile with it, I need features from later versions.
0
 
LVL 35

Accepted Solution

by:
TimYates earned 150 total points
ID: 9792020
You need to ensure you aren't using any of the Java 1.2+ things when you create your applet

then compile it with -target=1.1

Basically, no ArrayLists, Iterators, Graphics2D, etc...

Or...you can download the old 1.1 JDK, and compile your applet with that (fixing it so it compiles for 1.1)

http://java.sun.com/products/archive/index.html
(you want http://java.sun.com/products/archive/jdk/1.1.8_010/index.html)

Basically, IE ships with 1.1 (or nothing under XP)...  in the case of XP, they will have to download the plugin...  In other cases, compiling as a properly compliant 1.1 applet should work...

If you can, it's probably worth getting users to download the JRE (plugin), as then you can use the new nicer functions in your applets (and graphics looks nicer)...

Or maybe supply them with a CD containing the plugin?
0
 
LVL 92

Expert Comment

by:objects
ID: 9792023
> I have attempted to compile under jdk1.1.8 but my program will not compile with it,
> I need features from later versions.

Then users will also need the plugin to run it.
The MS VM only supports 1.1.

Alternatively remove use of >1.1 features from your applet.
0
Technology Partners: 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!

 
LVL 35

Expert Comment

by:TimYates
ID: 9792030
> but my program will not compile with it, I need features from later versions.

In that case, people are going to have to install the plugin...

As I said, there are 2 options

1)  Make your code 1.1 compliant
2)  Make the users download the plugin

(2) is probably the better choice, as the user will get a more complete, smoother looking applet...  and they should only have to download the plugin about once a year (at most) ;-)

Tim
0
 

Author Comment

by:Sowelu
ID: 9792056
Ah, okay. When I tried to compile under 1.1, it was exactly those ArrayLists that kept it from compiling. I don't need them in my program and I'm sure it's better off without them.

Unfortunately, since this is just an app I'm doing for fun, distributing a CD with the plugin isn't really an option... But if it's necessary to use >1.1 stuff, at least now I know that's what's wrong.

Thanks!
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9792063
> I don't need them in my program and I'm sure it's better off without them.

You can use Vector...it is similar :-)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9792065
Good luck!

Tim
0
 

Author Comment

by:Sowelu
ID: 9792099
Just managed to test it on an old machine and it DOES work when compiled for 1.1. Thanks again.

Once again, I learn that college does not truly prepare a person for the real world! ;)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9795609
>  learn that college does not truly prepare a person for the real world!

:-)

It's a very good start though :-)
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.
Suggested Courses

738 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