1

Some mac users are reporting this error. What version can I build the applet so that Mac users can use it?

Thanks

2
  • 1
    Do you have more information about the class and/or Mac OS version at issue? Commented Jan 12, 2012 at 4:09
  • Afraid not, the client never told me his version. He said he tried updating java so either he didn't update properly, or the newest Mac version is not new enough. Commented Jan 12, 2012 at 4:56

2 Answers 2

2

Use the cross-compilation options of javac to compile the code compatible for a particular version of Java.

Then use the deployJava.js script (linked from the info. page on applets) to check the user has the minimum version.

What version can I build the applet so that Mac users can use it?

As others have mentioned (/alluded to), Macs might support a variety of Java versions. Perhaps a more relevant question is this.

What is the minimum Java version required to run the app.?

I believe 1.4 maybe 1.3 is the minimum required. I've been using 1.6 to build it tho.

The cross-compilation options (especially using -bootclasspath) should answer that question definitively.

I did not mention the -bootclasspath initially since you might have been running a 1.7 SDK that now warns to use it when -source/-target are specified. Using the option requires that you have an rt.jar (the core J2SE classes) of the relevant version to compile against. It checks that the classes, methods & attributes in the code actually exist in the supplied RT jar.

So the upshot is that if you have a 1.6 (or latest) compiler and a JRE of the relevant target version (for the rt.jar as well as run-time testing), it should be possible to compile code compatible for any version.

If I download 1.4 and build with that, it should work for pretty much everyone?

  • It does not require a JDK, just a JRE and the right cross-compilation options.
  • It is impractical to deliver code to 'everyone'. Some people (or whoever controls the PC they use) choose not to install Java, to disable it if it comes standard.
Sign up to request clarification or add additional context in comments.

1 Comment

I believe 1.4 maybe 1.3 is the minimum required. I've been using 1.6 to build it tho. If I download 1.4 and build with that, it should work for pretty much everyone?
1

Check out your JDK or JRE version on the Mac. You are using an older version of JDK or JRE to load a jar file that packaged by a newer version of JDK or JRE than yours.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.