[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Applet not running for most users

Posted on 2003-11-20
9
Medium Priority
?
386 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
  • 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 600 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
Industry Leaders: 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 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