Java version mismatch

0 votes

I'm using a machine with java version 1.8.0.111 to write map-reduce programs but on running in VMware it is giving me error as

"Unsupported major. minor version 52.0". 

On checking the java version in VMware it is 1.7.0_67. Can you please help me upgrade the java version?

Feb 21, 2019 in Java by Saira
2,031 views

1 answer to this question.

0 votes

We get this error when we write a map reduce program in eclipse with Java 1.8 and export the Jar file where Java 1.6 or 1.7 is supported, i.e. we compile java program in higher version of Java and run in lower version of Java.

Before exporting the jar file from eclipse select the version 1.6 or 1.7 rather than 1.8. Please follow the below steps:

(i) Right Click on project and go to "Properties".

(ii) Now Select "Java Compiler" and uncheck use compliance from execution.

(iii) Select 1.6/1.7 and click on "Ok".

image

Now you can export the jar file and execute the code.

answered Feb 21, 2019 by Vaishnavi

Related Questions In Java

+1 vote
1 answer

How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

This error means you're trying to load ...READ MORE

answered Jun 8, 2018 in Java by Rishabh
• 3,620 points
3,220 views
+1 vote
1 answer

How to tell the Maven to use the latest version of dependency in Java?

If you always want to use the ...READ MORE

answered Jun 26, 2018 in Java by Sushmita
• 6,920 points
15,377 views
0 votes
1 answer
0 votes
1 answer

Error:java.lang.UnsupportedClassVersionError: Unsupported major.minor version

Hello @kartik, This error means you're trying to ...READ MORE

answered Jul 28, 2020 in Java by Niroj
• 82,840 points
1,654 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,223 views
+1 vote
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
8,360 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,500 points
17,433 views
0 votes
1 answer

Selenium JARS(Java) missing from downloadable link

Nothing to worry about here. In the ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,500 points

edited Aug 4, 2023 by Khan Sarfaraz 4,876 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,220 points
3,579 views
0 votes
2 answers

How can I convert a String variable to a primitive int in Java

 Here are two ways illustrating this: Integer x ...READ MORE

answered Aug 20, 2019 in Java by Sirajul
• 59,230 points
2,311 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP