可以删掉看看这里吧,
http://www.csdn.net/develop/article/15/15250.shtm

解决方案 »

  1.   

    当然可以删除了,你在特定的工程中要显式的申明用哪个
    Hashtable ht = new Hashtable();    ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");    ht.put(Context.PROVIDER_URL,"t3://localhost:7001");     try    {      Context ctx = new InitialContext(ht);      DataSource ds = (DataSource)ctx.lookup("SQLServer");      Connection con = ds.getConnection("system","12345678");//此处是WebLogic7的域用户和密码      Statement st = con.createStatement();      ResultSet res = st.executeQuery("select * from employees");      String line = "";      while (res.next())        line = line + res.getString("notes")+"\n";      jTextArea1.setText(line);      con.close();    }    catch (Exception ex)    {      jTextArea1.setText("error : "+ex.getMessage());    }