wood burning stoves 2.0*
The moose likes Applets and the fly likes Applet only works with one Java version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet only works with one Java version" Watch "Applet only works with one Java version" New topic
Author

Applet only works with one Java version

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

I've written an applet inside a signed JAR (needs a lot of OS interaction) which works perfectly in Java 1.4.2, which it's also written in.

However, when I try it with different Java versions (1.4.1 and 1.5 are tested) I get the following error:The class is com.hecc.ivr.viewer.ViewerApplet.
I haven't used any special Manifest to create the JAR, which is signed using a local keytool.

The HTML code:This installs Java 1.4.1_03 (most users have that one) if no newer version is installed - if I replace it with 1.4.2_06 (the version used to compile) it still does not work.

Anyone know how I can solve this without requiring Java 1.4.2?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

HTTP response code 401 is "Unauthorized". Are you sure this is a Java version thing, and not a security thing? Is the web server where the applet lives allowed to send to JAR file to the client machine you're testing on?


[Jess in Action][AskingGoodQuestions]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

You know, that is a good question.
The web directory it is in now has IIS security on it, so that might be the problem. If so, question is why 1.4.2 does work.

I'll test this tomorrow on my test server (IIS but no security).
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

Ok, security is the problem, and only in Java 1.4.1 - even a machine with only 1.5 worked (although I had to login twice).

Guess I'll have to change the HTML page to require 1.4.2_06 as the minimum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet only works with one Java version
 
Similar Threads
Problem in running applets in html
java.util.zip.ZipException: invalid entry crc-32
Problem loading applet from servlet - load: xxx.class not found
Applet not loading due to IOException
Applet not inited - http 401 on .jar files