AbdullahR
AbdullahR

Reputation: 1041

How do I upgrade Java Compiler?

I'm using JCreator to work with Java. I got this exception (or maybe error?) it says the following:

major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.

I downloaded the last version of Java SE, but that didn't work.

By the way, Java files compile fine and also run without any problem. But I have downloaded a file that my instructor has upload with many java classes and this message appears when I try to run the class that has the main method.

Upvotes: 2

Views: 6069

Answers (1)

Stephen C
Stephen C

Reputation: 719089

I've never used JCreator, but a little bit of Googling gave me this page of JCreator installation instructions, which has the following instructions for manually setting the JDK that JCreator uses:

  • Starting JCreator Without Using the Setup Wizard

  • With JCreator active, open the Options window from the Configure menu.

  • Click the JDK Profiles option.

  • Click the default item in the list, and click Edit.

  • Ensure that the Name field shows the correct version of the selected JDK directory; in this case, JDK version jdk1.6.0. [ That's a typo I think ... ]

  • Set the JDK Home path by clicking the Browse button next to this field.

  • Browse to the root directory of the JDK installation: C:..\jdk1.7.0. Click OK.

  • Click the Documentation tab, and Add the path: C:..\jdk1.7.0\docs. Click OK.

  • Close the windows.

Yours is a slightly different scenario, but I think these instructions should also work for changing the JDK for an existing installation of JCreator.

(Use the pathnames of your latest JDK installation ... obviously.)

Upvotes: 2

Related Questions