Question

How can you determine the minimum version of Java required on a client's browser to run an applet that I've developed? I would like to do this so that I can determine, through, javascript, if the browser the user is running is capable of running my applet and displaying a message if not.

Thanks in advance, Tim

Was it helpful?

Solution

Your compiler setting will tell you a lot of that. What target are you using in the javac element of the ant script (or the target setting of whatever IDE you are using)? If this is 1.5, then 1.5 would be the minimum to run your app.

Do you use generics? If so, then (short of running one of the retrotranslators) you will require 1.5+.

Similarly, you can compile your code against the older libs (1.4, etc) to determine if you are using any APIs that were not available then.

OTHER TIPS

If you are using Eclipse to develop your applet you can just change compliance level and check that your program still compile. To do this go to Windows -> preferences -> java -> Compiler or something like that

If you are not using eclipse i guess you can change java compile compliance level on the javac command line.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top