• 26 March

    [Fixed] no suitable driver found for jdbc

    In this post, we will see how to resolve java.sql.SQLException: No suitable driver found for JDBC. There can be multiple reasons for this exception and let’s see it one by one. [toc] connector jar is not on classpath you need make sure you have connector jar on classpath. For example: If you are using mysql […]

  • 22 March

    [Fixed] insert dimensions to complete referencetype

    In this post, we will see about error insert dimensions to complete referencetype. You will get this error when you are trying to pass primitive objects into generic type declaration but generic always expect a Wrapper class in java. For example: Let’s say you have the below class named InsertDimensionlMain.java. package org.arpit.java2blog; public class InsertDimensionlMain […]

  • 17 March

    [Fixed] no main manifest attribute

    In this post, we will see how to solve Unable to execute jar- file: “no main manifest attribute”. [toc] Problem When you have a self-executable jar and trying to execute it. You might get this error. Unable to execute jar- file: “no main manifest attribute” Solution Maven You might get this error when Main-Class entry […]

  • 09 October

    [Fixed] Reached end of file while parsing

    In this post, we will see how to solve reached end of file while parsing in java. We generally get this error when we forgot to end code of block(class/method) with }. Let’s understand this with the help of example. package org.arpit.java2blog; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello world from […]

  • 06 October

    Fix cannot make static reference to non-static method

    In this post, we will see how to solve cannot make static reference to non-static method. [toc] Let’s understand this error with the help of example. package org.arpit.java2blog; public class JavaHelloWorld { public static void main(String args[]) { sayHello(); } public void sayHello() { System.out.println("Hello world from java2blog"); } } Above program won’t compile and […]

  • 13 April

    No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    If you are getting below error while running the Maven build. No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? There are 3 ways to solve No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?. [toc] Eclipse […]

  • 27 March

    Could not find or load main class

    In this post, we will discuss Could not find or load main class. Did you get this error before? If you have good amount of experience in Java programming or as a novice java developer, you might have encountered this error: Could not find or load main class. [toc] Before we understand about this error, let’s […]

  • 28 October

    Could not reserve enough space for 2097152kb object heap

    In this post, we will see an error(Could not reserve enough space for 2097152kb object heap object heap) which you might have encountered while dealing with JVM.We will see how can we fix this issue. [toc] error occurred during initialization of vm could not reserve enough space for 2097152kb object heap is generally raised when […]

  • 28 October

    Error could not create the Java virtual machine in java

    In this post, we will about an error: Could not create the Java virtual machine in java. You can provide VM arguments to provide heap size for Java virtual machine. You can specify VM argument -Xms and -Xmx in form of KB, MB or GB. For example: Let’s say you want to specify maximum heap […]

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.