Error could not find or load main class in Eclipse – 3 Ways to Fix

In this tutorial you will learn about the error could not find or load main class in eclipse and the ways that could solve this error. When class loader is unable to load the main class of our application then this error will come. Many reasons are there for this has to be happen. Ways to Fix Error could not find or load main class in Eclipse 1. If Path is Incorrectly Specified This error will come mainly due to

Read more

Solve Cannot make a static reference to the non-static method Error

Here you will learn to solve error “cannot make a static reference to the non-static method” or “non static method cannot be referenced from a static context”. Lets take one example where this error occurs. When you will compile below code then you will get an error.

Why this Error Occurs? This error occurs when we try to access a non static method or member directly inside a static method. In above code print() is a non static method

Read more

Solve java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Error

In this tutorial you will learn to solve java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver error. If you are using jdk 1.8 and trying to connect java with MS Access database then you will get error java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver. This is because java 8 or jdk 1.8 does not support jdbc odbc bridge. To connect with ms access you have to import some libraries. How to Solve java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Error? 1. Download jars from below link and import in the ide you are using. Link: http://www.mediafire.com/download/ahzw21rrp20qiw8/ucanaccess.rar   Also Read: How

Read more

Solve javac is not recognized as an internal or external command Error

The error javac is not recognized as an internal or external command arises when we try to compile any java source file using javac command. The reason for this error is because the path of javac command is not set properly. This error can be solved easily by setting javac compiler path in environment variables. How to solve javac is not recognized as an internal or external command Error? This can be done in two ways as given below.  

Read more