I need to connect DB2 with Java. Kindly help me to connect DB2 with java in ECLIPSE. It would be of great help if you could guide me step by s
Well, you first need to have the DB2 Driver in your classpath; namely the db2jcc4.jar file. A syntax mistake that I noticed is:-
You have the line as follows
conn = DriverManager.getConnection("jdbc:db2:sabarish","db2admin","Murugasaranam");
_______________________________________^^^_________________________________
You should add two forward slash characters(/) after db2: and before sabarish like this
conn = DriverManager.getConnection("jdbc:db2://sabarish","db2admin","Murugasaranam")