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 in Big Data Hadoop by Trina
103 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 by Gitika
• 25,340 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 by Venkita
• 240 points

Related Questions In Big Data Hadoop

0 votes
2 answers
0 votes
1 answer
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,170 points
1,132 views
0 votes
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,710 points
3,301 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,710 points
391 views
0 votes
10 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
16,248 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,260 points
1,185 views