Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


pradeep
exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0
2 Answer(s)      4 years and 7 months ago
Posted in : Java Beginners


Below class is compling but runtime i am getting the this error :exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0

class xxx
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}


for example: javac xxx.java-->comping
java xxxx:error :exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0

Advertisement
View Answers

April 9, 2010 at 10:25 AM


Hi Friend,

This error comes on using different java versions for compilation and execution of java program. Therefore set the path of one java version and use it for compilation and execution.

Thanks


July 2, 2011 at 10:22 AM


in your case it looks like that you are using JDK 1.6 for compilation and there is no JRE6 available in your machine. if you are using eclipse then check your java compiler setting and make source level 1.5 if you have JRE 1.5 and stated unsupportedclassversionerror comes when JRE used to execute program is lower than Java version used to compile.



Related Tutorials/Questions & Answers:
exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 - Java Beginners
exception in thread main java.lang.unsupportedclassversionerror unsupported... java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 class xxx { public static void... java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 
exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 - Java Beginners
exception in thread main java.lang.unsupportedclassversionerror unsupported major.minor version 50.0  I am getting the below error when the class now... java.lang.unsupportedclassversionerror unsupported major.minor version 50.0
Advertisements
javax.servlet.ServletException: Database/DatabaseBean (Unsupported major.minor version 50.0) - JSP-Servlet
java.lang.UnsupportedClassVersionError: Database/DatabaseBean (Unsupported major.minor version 50.0... javax.servlet.ServletException: Database/DatabaseBean (Unsupported major.minor version 50.0...javax.servlet.ServletException: Database/DatabaseBean (Unsupported major.minor
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...) { sqle.printStackTrace(); } finally { try {stmt.close();} catch (Exception e
Exception in thread "main" java.lang.ClassCastException
Exception in thread "main" java.lang.ClassCastException  I am trying to connect the database. I am stuck with this exception that is getting thrown...) { sqle.printStackTrace(); } finally { try {stmt.close();} catch (Exception e
exception in thread main while running servlet
exception in thread main while running servlet  I got exception in thread main no such method error while running servlet. I have added servlet.api.jar file in classpath.my classpath is C:\Program Files\Apache Software Foundation
java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.UnsupportedClassVersionError: Bad version number in .class file ... java.lang.UnsupportedClassVersionError: Bad version number in .class file... Error message: HTTP Status 500 - type Exception report message description
Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: TESTING is not mapped [FROM TESTING]
Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: TESTING...(HiberTest.java:18) Exception in thread "main...)); } } } couldn't connect to tDB using, SQL statements. Exception in thread "main
Exception in thread
:\mail.jar SendMailTLSDFC Exception in thread "main" java.lang.NoClassDefFoundError...Exception in thread   Hi, I have created a java file for sending a file to my mail. I am using mail.jar file. I am able to create .class file
Main Thread and Child Thread
and Child Threads used in Programming. Main thread is automatically created when program runs. Child Thread gets created by the main thread . Java Main... 1 this thread is main 1 this thread is Child 2 this thread is Child 3
Exception in Thread
Exception in Thread    i am developing a rmi application in eclipse... client and generate connection with server i have following exception : Blockquote Exception in thread "RMI TCP Connection(idle
How to Differenciate Main Thread and Child Thread in Java
How to Differenciate Main Thread and Child Thread in Java  hi... Main Thread and Java Child Thread. Please Suggest any example or online link... in Java Programming Language. These are Java Main Thread and the Child Thread
difference between main thread and child thread?
difference between main thread and child thread?  any one give correct exact difference.   in jsp 7 implicit objects are available those are 1:response->This denotes the data included with the HTTP Response. 2
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException  ... is clicking I getting the error : Exception in thread "AWT-EventQueue-0... { Image m; Thread t; NextPage(final String uname
how to solve the nullPointer Exception in main - Java Beginners
: Exception in thread "main" java.lang.NullPointerException...how to solve the nullPointer Exception in main  New to Java ,pls help me how fix Null pointer Exception in main: two files , split .java another
How to rectify "Bad version number in .class file" exception in Eclipse
How to rectify "Bad version number in .class file" exception in Eclipse  HTTP Status 500 - type Exception report message description... this request. exception javax.servlet.ServletException: Bad version number in .class
Java Exception Thread
Java Exception Thread     ... to Overcome this Thread Exception in Java Program In the preceding code, we... RunnableExample { public static void main(String args[]) { Thread threada = new
MAin error
MAin error  Error while running hello program in another dir rather in bin. path is already set. java -version jdk1.6.0_24 no error while compilation but @ d tym of runnin error in main class is generated Exception in thread
Thread
(Exception ex) { } } }; Thread mainth = new Thread(main... should produce the sum of 1 to 10, 11 to 20 and 21to 30 respectively. Main thread...); } catch(Exception ex) { } } }; Thread thread3 = new Thread
Thread
Thread  Explain two ways of creating thread in java. Explain at three methods of thread class.   Java Create Thread There are two main... Create Thread There are two main ways of creating a thread. The first is to extend
Unhandled Exception in Thread
Unhandled Exception in thread are thrown during the execution of the program... to rectify it is to change it. Example of Unhandled exception in Thread: class... compile-single: run-single: Exception in thread "main"
if i run this prog, i got exeption in thread "main" java.lang.ArrayIndexOutOfBoundsException:0 at Maxof2.main(Maxof2.java:9), whats the resolution for ths?
if i run this prog, i got exeption in thread "main...?  class Maxof2{ public static void main(String args[]){ //taking...{ public static void main(String args[]){ Scanner input=new Scanner(System.in
Thread
main(String [] args) { MyThread m=new MyThread("Thread Started... to the thread constructor eventhough we had created only one thread and if you say we have added to point to the current thread then why we have not added
Thread
Thread  class Extender extends Thread { Extender(Runnable run...(); } public void run(){ System.out.println("Extender Thread is Started :"); //new Thread(new Implementer()).start(); } } class Implementer
Thread
=" + i); } public static void main(string args[]) { A a = new A(); Thread t = new thread(a); t.start(); } } Is it possible to run above program with out...Thread  will this code work..? class A extends Thread { public
thread
thread  can parent thread be dead if child thread is not dead
Thread
Thread  what is the use of thread
Thread
Thread  Thread Life Cycle
Thread
Thread  What is multi-threading? Explain different states of a thread... processor system. States of Thread: New state ? After the creations of Thread instance the thread is in this state but before the start() method invocation
Thread
Thread  what happen when we call the Wait(),Notify() and NotifyAll() methods in the Thread
Thread
Thread   there are two threads running at a time.. when am updating a values in database. both thread halt and stop for moment till it get updated into database... so i dnt want thread to get halts for tht moment of period. whats
 

 

 

DMCA.com