Reputation: 59273
Many of the users of my Java applets/applications don't have Java 7 installed (about 80%, surprisingly). If I compile my programs with Java 6,
Upvotes: 2
Views: 149
Reputation: 718698
Security flaws have been discovered with both Java 7 and Java 6 when running in browser sandboxes; i.e. when running applets. The most recent one was Java 7 only, but previous ones have applied to Java 6 or multiple versions.
The problem is that people who run your applets need to have Java enabled in their browsers. And that makes them vulnerable to attack by people planting bad applets; e.g. on hacked 3rd party websites.
The best security advice we can give to users is to disable browser Java because of past and potential future vulnerabilities. (On some platforms, a complete uninstall is advisable). These measures will have the side-effect of rendering your applets useless.
IMO, you should be removing your applet functionality entirely rather than trying to make it work with multiple Java versions.
Upvotes: 0
Reputation: 533442
Will the Java 7 users be exposed to the security vulnerabilities in Java 6?
AFAIK, It's Java 7 which has the most serious security vulnerabilities. How you compile the code doesn't matter, only what the code does and which JVM version you use.
Will my applet/application work with Java 6 and 7?
If it has not bugs, yes. If it has bugs, it is most likely to do the same thing on both, but possibly not. i.e. it might be that a bug appear in one version but no the other or in different ways on different versions.
Are there any disadvantages? I am not really using any of the new Java 7 features (except the diamond operator which is easily fixed).
The disadvantage is just that you cannot use the new syntax or the new Java 7 libraries.
How the code runs or performs is not changed.
Upvotes: 3