Question

I have no idea why I am getting this error, In the program i am not accessing any array. But its still giving this error.

java.lang.ArrayIndexOutOfBoundsException: 0 at oracle.jdbc.driver.OracleSql.main(OracleSql.java:1666)

I have posted the code below.

public class ItT4 {
public static void main(String[] args) {
    try {
        // loading the class
        Class.forName("oracle.jdbc.driver.OracleDriver");

    } catch (Exception e) {

        e.printStackTrace();
    }
}//closing main
}//closing class 

I have set the class path required for drivers. and even gone through few links in stackoverflow.

Modified

I removed everything and tried printing out the s simple statement. Still i am getting the same error. The code is given below.

public class ItT4 {
public static void main(String[] args) {

    System.out.println("hello boss");
}

}

Was it helpful?

Solution

you can follow the following process

  1. click project
  2. click on clean
  3. select your project
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top