Skip to content

Commit ce3e87f

Browse files
authored
Merge pull request #110640 from ambhatna/fixtutorial
fix java tutorial
2 parents fcddf1e + 0c2a251 commit ce3e87f

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

articles/mysql/connect-java.md

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,6 @@ public class CreateTableInsertRows {
5858
String user = "myadmin@mydemoserver";
5959
String password = "<server_admin_password>";
6060

61-
// check that the driver is installed
62-
try
63-
{
64-
Class.forName("org.mariadb.jdbc");
65-
}
66-
catch (ClassNotFoundException e)
67-
{
68-
throw new ClassNotFoundException("MariaDB JDBC driver NOT detected in library path.", e);
69-
}
70-
71-
System.out.println("MariaDB JDBC driver detected in library path.");
72-
7361
Connection connection = null;
7462

7563
// Initialize connection object
@@ -161,18 +149,6 @@ public class ReadTable {
161149
String user = "myadmin@mydemoserver";
162150
String password = "<server_admin_password>";
163151

164-
// check that the driver is installed
165-
try
166-
{
167-
Class.forName("org.mariadb.jdbc");
168-
}
169-
catch (ClassNotFoundException e)
170-
{
171-
throw new ClassNotFoundException("MariaDB JDBC driver NOT detected in library path.", e);
172-
}
173-
174-
System.out.println("MariaDB JDBC driver detected in library path.");
175-
176152
Connection connection = null;
177153

178154
// Initialize connection object
@@ -248,18 +224,6 @@ public class UpdateTable {
248224
String user = "myadmin@mydemoserver";
249225
String password = "<server_admin_password>";
250226

251-
// check that the driver is installed
252-
try
253-
{
254-
Class.forName("org.mariadb.jdbc");
255-
}
256-
catch (ClassNotFoundException e)
257-
{
258-
throw new ClassNotFoundException("MariaDB JDBC driver NOT detected in library path.", e);
259-
}
260-
261-
System.out.println("MariaDB JDBC driver detected in library path.");
262-
263227
Connection connection = null;
264228

265229
// Initialize connection object
@@ -330,18 +294,6 @@ public class DeleteTable {
330294
String database = "quickstartdb";
331295
String user = "myadmin@mydemoserver";
332296
String password = "<server_admin_password>";
333-
334-
// check that the driver is installed
335-
try
336-
{
337-
Class.forName("org.mariadb.jdbc");
338-
}
339-
catch (ClassNotFoundException e)
340-
{
341-
throw new ClassNotFoundException("MariaDB JDBC driver NOT detected in library path.", e);
342-
}
343-
344-
System.out.println("MariaDB JDBC driver detected in library path.");
345297

346298
Connection connection = null;
347299

0 commit comments

Comments
 (0)