Connecting Eclipse IDE to MySQL database. Help!

Connecting Eclipse IDE to MySQL database. Help!

Author
Discussion

Andy 308GTB

Original Poster:

2,955 posts

227 months

Tuesday 26th December 2023
quotequote all
I am attempting to help my son with his Computer Science project. He is planning on using Eclipse Window Builder atop of a MySQL database. We are doing this on Windows 11

So far, I have installed Eclipse Version: 2023-12 (4.30.0) and created a project on it.
I have downloaded and added mysql-connector-j-8.0.31 as a Referenced Library in the project.
I have installed mysql-8.2.0-winx64 on the PC

Q1. In theory, do I have all the components I need?
Q2. I think I need to create the connector as a Class Path?

Any guidance would be gratefully received. I've gone round and round in circles watching YouTube tutorials. It would be really helpful to have some confirmation that I am heading in the right direction!

TIA







Ynox

1,723 posts

185 months

Tuesday 26th December 2023
quotequote all
In theory, you’ve got everything you need.

- Eclipse window builder
- MySQL database
- Connector to connect to the DB

You’re correct in that the library for the DB driver needs to be on the class path. It might be worth looking into using Gradle or Maven to simplify this possibly (or just chuck the library into a lib folder and add it to the classpath environment variable).

Edit this might be a useful video - https://youtu.be/o7gLp6JCM0w?si=vzRxbgaAvcFLjxrJ . I’ve never used the Eclipse Window builder myself (always wrote my own Swing code for UIs/Applets and I’d recommend going for a web front end than using Java for it these days if it wasn’t for a uni assignment).


Edited by Ynox on Tuesday 26th December 21:53

Andy 308GTB

Original Poster:

2,955 posts

227 months

Wednesday 27th December 2023
quotequote all
Ynox said:
In theory, you’ve got everything you need.

- Eclipse window builder
- MySQL database
- Connector to connect to the DB

You’re correct in that the library for the DB driver needs to be on the class path. It might be worth looking into using Gradle or Maven to simplify this possibly (or just chuck the library into a lib folder and add it to the classpath environment variable).

Edit this might be a useful video - https://youtu.be/o7gLp6JCM0w?si=vzRxbgaAvcFLjxrJ . I’ve never used the Eclipse Window builder myself (always wrote my own Swing code for UIs/Applets and I’d recommend going for a web front end than using Java for it these days if it wasn’t for a uni assignment).
Thanks very much, that's very helpful - especially the part about using a lib folder, this is the area that I am currently stumbing around!