I am using oracle 11g and jdk 1.6 and ojdbc6 driver.
I have created GUI in netbeans GUI builder with DND.
I want to make a db connection from JButton actionPerformed method but it hangs on DriverManager.getConnection().
what is wrong with the following code.I have called this method from actionPerformed DataBase.createConnection1().
Thanks for reply.
I have tried this code on 10 different PC's on same environment but it creates problem on only 2,3 PC's and hangs.
If it is my swing code issu then why it is running on some PC's.
I have also tried to make connection in differenct thread but same problem.
If the PCs on which there is no problem can connect to the database very quickly then you will not notice anything. But if the other PCs cannot connect at all, it can take quite a while for the connection attempt to timeout, and the GUI will not respond for this entire duration.
Using either NetBeans 6.9.1 or 7.0.1, Java 1.6 and Oracle 11g. I have the oracle JDBC jar files (ojdbc6_g.jar) within my project's library and when I run just the database connection code (no GUI interface), I'm able connect with no issues. As soon as I try to connect from within a GUI created by Netbeans (New Java Desktop Application Project), the thread blocks on...
If anyone has any suggestions or ideas I'd really appreciate it.
Ever since I found this suit I've felt strange new needs. And a tiny ad: