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
391 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
• 36,530 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
234 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
489 views
0 votes
1 answer
+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,950 points
5,794 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,950 points
867 views
+1 vote
11 answers

hadoop fs -put command?

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

answered Dec 7, 2018 in Big Data Hadoop by Aditya
36,443 views
–1 vote
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,320 points
2,172 views