java.lang.ArrayIndexOutOfBoundsException:for jdbc connection [英] java.lang.ArrayIndexOutOfBoundsException: for jdbc connection

查看:335
本文介绍了java.lang.ArrayIndexOutOfBoundsException:for jdbc connection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道为什么我得到这个错误,在程序我不访问任何数组。但它仍然会出现这个错误。



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



我已张贴下面的代码。

  public class ItT4 {
public static void main(String [] args){
try {
//加载类
Class.forName(oracle.jdbc。 driver.OracleDriver);

} catch(Exception e){

e.printStackTrace();
}
} //关闭主
} //关闭类

我已经设置驱动程序所需的类路径。




$ b

并尝试打印出简单的语句。仍然我得到相同的错误。代码如下:

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

System.out.println(hello boss);
}

}

解决方案

您可以按照以下流程


  1. 点击项目

  2. 点击清除

  3. 选择您的项目


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");
}

}

解决方案

you can follow the following process

  1. click project
  2. click on clean
  3. select your project

这篇关于java.lang.ArrayIndexOutOfBoundsException:for jdbc connection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆