Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Applet not running for most users

Posted on 2003-11-20
9
Medium Priority
?
384 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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

636 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