+ 1

How do I connect MySQL to JavaEditor?

I have to programm a quiz for my last assignment in school ever. We never did this in school before and I have 3 days left. Nothing worked so far. I have JavaEditor, Xampp, which holds my database with questions, MySQL Workbench and a ConnectorJ. Idek what I need. My teacher just ignores me and this assignment is a big chunk of my final graduation grade. Where do I write the JDBC connection? In the GUI or another class connected to it? How do I write it? Every tutorial I saw in the past 4 days didn't help me. I need to use JavaEditor. Bc the teacher was sick a lot and Coronavirus, we still haven't done stuff like Arrays and Loops but I have papers for that. I'm basically supposed to know something I can't know anything about and get graded for it. You guys are basically my last straw and if none of you can help I'll fail.

17th Jul 2020, 2:16 PM
Elie
2 Answers
+ 1
Oohh sorry about that
20th Jul 2020, 3:14 AM
Princess Jessica
Princess Jessica - avatar
+ 1
Elie To connect to MySQL from Java, you have to use the JDBC driver from MySQL. The MySQL JDBC is called MySQL Connector / J. You'll find the latest MySQL JDBC driver under the following URL: http://dev-mysql.com/downloads/connector/j. The download contains a JAR file which we require later.
20th Jul 2020, 3:21 AM
Princess Jessica
Princess Jessica - avatar