Executing an applet in a previous version than the one it was compiled for.

What happens if an applet was compiled by a version of JDK, and the client visiting the web page which contains the applet has a previous version of JRE? Actually, the applet was compiled with JDK 1.5-beta2, and clients have JRE 1.4 or maybe previous versions.
LVL 3
pulupulAsked:
Who is Participating?
 
objectsCommented:
14. clients will run fine of course as long as you don't use any 1.5 features.

If you are targetting earlier versions then I'd suggest using the minimum version jdk you need to support  or you compile using the -target option to specify the minimum jdk version you need it to run on.
0
 
girionisCommented:
If it does not use APIs only available on jdk1.5 then it would probably run. You might also get a bad magic number error.
0
 
CEHJCommented:
It'll probably break, but i'm not 100% certain. Why not try it? ;-)
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
WebstormCommented:
Hi pulupul,

Most browser are IE with its default JRE (version 1.1.x or less) which will not be updated by microsoft. Since this very old version, some internal structures have changed, and most applets compiled with recent compiler cannot run on this old JRE.
You can use HtmlConverter (tool included in JDK) which translate the classic APPLET tag to an OBJECT tag, in order to allow client browsers to update their JRE.

0
 
sudhakar_koundinyaCommented:
I agree with Webstorm
0
 
CEHJCommented:
I'd guess that pulpul is fully aware of that, and s/he says:

>>and clients have JRE 1.4 or maybe previous versions.

What proportions are we're talking about in the above pulpul?
0
 
pulupulAuthor Commented:
CEHJ not many PCs, just a LAN... about 20.
0
 
WebstormCommented:
My solution also work for LAN.
0
 
objectsCommented:
If you applet requires a greater version of jre than is installed then they will need to upgrade.
0
 
objectsCommented:
Do you know what version your applet actually requires?
0
 
CEHJCommented:
>>14. clients will run fine of course as long as you don't use any 1.5 features.

>>or you compile using the -target option to specify the minimum jdk version you need it to run on.

Those two suggestions seem to be rather contradictory. The second one is the one you should probably pay attention to

0
 
objectsCommented:
> Those two suggestions seem to be rather contradictory.

Not at all (though your selective quoting is misleading), suggest you read the question a bit more closely.

pulupul,

Let me know if you have any questions.
0
 
pulupulAuthor Commented:
Sorry for the delay, I've been pretty busy lately.
0
 
WebstormCommented:
:-)
0
 
objectsCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.