Hadoop: Error: Exception in thread “main” java.lang.UnsupportedClassVersionError: a

+1 vote
I installed JDK7, a simple hello word program gets compile but when I run this I got following exception. I checked java -version on command prompt, it shows Java version 1.4.2_03 but when I tried to install new java version. Can anyone help me with this?
Aug 5, 2019 in Big Data Hadoop by Trina
164 views

2 answers to this question.

+1 vote

Hi,

Try sudo update-alternatives --config java from the command line to set the version of the JRE you want to use. This should fix it.

answered Aug 5, 2019 by Gitika
• 25,440 points
+1 vote
The reason for this error is because of the wrong version on your side. Please note you should use uninstall JDK 1.7 and use JDK 1,8 and they try the example. That should solve the issue. Reply back with info that you were able to run it :)
answered Aug 6, 2019 by Venkita
• 240 points

Related Questions In Big Data Hadoop

0 votes
2 answers

Exception in thread "main" java.lang.UnsupportedClassVersionError

Hi, keep in mind do not forget to ...READ MORE

answered Aug 5, 2019 in Big Data Hadoop by Rashi
98 views
0 votes
1 answer

Exception in thread "main" java.lang.NoClassDefFoundError

As far I can make out from ...READ MORE

answered Aug 9, 2019 in Big Data Hadoop by Arpit
108 views
0 votes
1 answer

Hadoop Java Error: java.lang.NoClassDefFoundError: WordCount (wrong name: org/myorg/WordCount)

Hey, try this code import java.io.IOException; import java.util.Iterator; import java.util.StringTokenizer; import ...READ MORE

answered Sep 19, 2018 in Big Data Hadoop by slayer
• 29,260 points
1,417 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,840 points
3,887 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,840 points
533 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
20,604 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,290 points
1,456 views