If you have any question, leave it in comment section below. Download links (Yes, you will have to register.): MySQL server: …
Original source
If you have any question, leave it in comment section below. Download links (Yes, you will have to register.): MySQL server: …
Original source
12 responses to “Java and JDBC tutorial #1: Make connection”
what should i do if i dont have test database??
Thank you! Old but Gold! kkkkk Very useful.
thanks so much bro your the best 😀
Thank you so much for the excellent tutorial! I can't wait to learn from your other tutorials, as well. I have a lot of experience with SQL using command line access, but wanted to give writing Java Apps a try, too. Unfortunately, I am brand new to Java, having coded in C/C++ and Python for most of my experience, but your tutorial was FANTASTICALLY clear. Thank you again–much appreciated!!
(It was also a nice coincidence that you use IntelliJ in this tutorial, as I had just installed it and was trying to figure my way around the IDE. I actually like it so far, but again, I am brand new to Java and have neither used Netbeans nor Eclipse. Thanks again.)
Thank you OverG88
I will keep watching for asking.
Even no speaking English I understood the tutorial.
See you.
Oh, thats very easy. You can load your properties file as resource bundle: ResourceBundle bundle = ResourceBundle.getBundle("com.yourpackage.filename"); //Don't put .properties extension after filename
To retrieve specific property from your properties file (for example you have driver property: driver=com.mysql.jdbc.Driver): String driver = bundle.getString("driver");
Good luck!
Oh! Yes, that's right, Sorry me.
Obrigado = thanks
Cool, thanks for the reply. I think I'm going to stick to Eclipse for now.
I'm just trying out Intellij. I really really love its intellisense. And its suprisingly fast, considering it uses swing for GUI. But I find this community version useless for dynamic web projects. Maybe one day I buy a ultimate version.. So for now, my major IDE for Java projects is still Eclipse.
Which IDE do you like better. Eclipse or intelliJ? I remember you used to use Eclipse in previous tutorials. What made you change?
Class Properties? You mean file .properties to store driver, password and user values?
How I could use a class Properties for driver, password and user?
Thanks a lot!