As many of them are getting the issues regarding the ERROR: java.lang.ClassNotFoundException: I would like share few points. May be: 1. You haven't imported the correct jar file (jdbc driver from MySQL Installation) 2. Try to clear the workspace cache in VS Code. (don't know how but sometimes VS Code recommends me to do by a notification) 3. Restart the whole procedure... 4. Replace the statement "Class.forName("com.mysql.jdbc.Driver");" to "Class.forName("com.mysql.cj.jdbc.Driver");" (suggestion given by VS Code terminal) Hope it helps. 5. Or the main reason can be, you may not set the path for MySQL bin folder in either system variables or user variables.. The file hierarchy that must be running currently in VS code must be as follows: ProjectName { .vscode { settings.json } lib { } src { App.java } README.md "Debugger for java" must be installed, so that "Run Java" option will be visible to compile and run. Hope it works. ✨😀
@DAOXINNo158 ай бұрын
what if we get this instead about PS C:\Users\user\Desktop\MySqlProject\FInalJBDC> PS C:\Users\user\Desktop\MySqlProject\FInalJBDC> ^C PS C:\Users\user\Desktop\MySqlProject\FInalJBDC> PS C:\Users\user\Desktop\MySqlProject\FInalJBDC> c:; cd I no longer got the error of this ava.lang.ClassNotFoundException: when I did the class change as you said and restart the project from scratch but I just get that with what I showed you above now instead of printing out the tables or anything
@janhavipimplikar60483 жыл бұрын
This explanation is a lifesaver! It was really difficult to find JDBC tutorials in VSCode but this one nailed it .Thanks a lot for uploading this video!
@ryansatriayudha Жыл бұрын
This video is very helpful. I have tried many times watching other videos but never work. This works well after many mistakes. Thank you very much! Best wishes from Thailand.
@FERRUM-ix5yk2 ай бұрын
is this a trap? 😂
@PrernaSharma-yl6ih6 ай бұрын
Thanks a lot😭, I was struggling in running this program for 2-3 hours.... Finally I got the solution while scrolling through the comments...Thanks once again..
@kiaehe62924 жыл бұрын
thanks innovator, fyi for some of you guys out there, here are a couple of errors i got and their solution 1)The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. the solution is to change line 7 to :-Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/invoicing","username","password"); and change the 0 to 1 on line 12 jic.
@akshattrivedi41647 ай бұрын
Great tutorial man 👍 Still working after 2 years!!
@TheOnlyShubh2 жыл бұрын
I am unable to find that ConnectorJ 3:42 after Installing MySql. Help Please
@harshith_takkala2 жыл бұрын
Then, please use MySQL installer that is already installed by the executable to download jar
@tinayetsinakwadi89064 жыл бұрын
Thank you so much my man. You are a life saver. You deserve many views. Ill try and share with as many people as possible.
@harshith_takkala4 жыл бұрын
Thanks !! Check out my other videos too!!
@arthurbttf3 жыл бұрын
You are the boss! No one else has explained where this goddamned classpath was, you're a literal life saver!
@harshith_takkala4 жыл бұрын
Like if you find it useful. Cheers !!
@udaan8782 жыл бұрын
i am facing an error in class.forname(in this loction )it is saying com.mysql.jbdc.Driver() doesnot exist. What should i do now ?????????
@harshith_takkala2 жыл бұрын
I think you havent included the driver jar file into the project.
@bagwanmohdhuzaif12633 жыл бұрын
Thanks I am trying to run the first jdbc program from last 5 to 6 and your vedio helped thanks so much it really helped
@EnzoLadriere Жыл бұрын
Hey ! Thanks for the tutorial but i have a question. Why its works with "Run java" and not with javac + java ?
@harshith_takkala Жыл бұрын
It works, but we have to add some arguments in the command
@haveagreatday7051 Жыл бұрын
@@harshith_takkala I also have this question. What arguments need to be added to the command?
@harshith_takkala Жыл бұрын
We set class path, then compile, then run it. stackoverflow.com/questions/25186557/how-to-compile-mysql-jdbc-driver-with-a-java-file-in-cmd
@crimson47062 жыл бұрын
may i ask you how to show all the columns? i have three columns and it only showed one column
@harshith_takkala2 жыл бұрын
The query has to be "SELECT * FROM and also in the println statement inside the while loop, it must have same number of functions as that of columns to be printed with indices starting from 1.
@joanmambwe35214 ай бұрын
Hello, I'm having the error, 'java.sql.SQLException: Access denied for user 'USER'@'localhost' (using password: NO). How do i fix it?
@harshith_takkala4 ай бұрын
I am not sure exactly, check the configurations of mysql, maybe something you missed
@FERRUM-ix5yk2 ай бұрын
You probably ran it as administrator, which changes the path to the file
@wagnerdds2 жыл бұрын
Thanks for your tutorial. It saved my life!
@ommule49993 жыл бұрын
Just a small doubt, when I run the code its displaying the output in the debug console. Can u suggest a fix ?
@harshith_takkala3 жыл бұрын
The "Debugger for Java" extension is responsible for running and debugging a java program. May be: 1. You are clicking on "Debug Java" or "Debug" instead of "Run Java" or "Run" 2. May be you are clicking "F5" (shortcut for debugging the program). If not working, then I dont know, If you got the solution, please share here. 🙂
@soueuoctavio42813 жыл бұрын
call KZbin translator I'm Brazilian. this was the Google translator who translated .Thank you
@harshith_takkala3 жыл бұрын
English ?
@soueuoctavio42813 жыл бұрын
Brazil .português
@nisarg0013 жыл бұрын
Thank you so much bro. I was going to switch to ecllipse but you saved me.
@harshith_takkala3 жыл бұрын
😁😁 My job done, I was expecting a comment of one of this kind. Thanks!
@husnajaved75144 жыл бұрын
I'm very grateful to you Sir!!You did it really well
@harshith_takkala4 жыл бұрын
Thankyou ! Check out my other videos too !
@adonathomas13953 жыл бұрын
I am having an issue. I installed MySQL Installer and added connector via library. But is is showing error "java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver" . But I can see it in libraries. I also deleted and added the library again.Do you have any idea how to solve this ?
@harshith_takkala3 жыл бұрын
I think you are running the program with "Run code" extension. You have to run program with "Run Java" that comes from Java Test runner and Project manager extensions. Hope you get it.
@harshith_takkala3 жыл бұрын
May be: 1. You haven't imported the correct jar file (jdbc driver from MySQL Installation) 2. Try to clear the workspace cache in VS Code. (don't know how but sometimes VS Code recommends me to do by a notification) 3. Restart the whole procedure... 4. Replace the statement "Class.forName("com.mysql.jdbc.Driver");" to "Class.forName("com.mysql.cj.jdbc.Driver");" (suggestion given by VS Code terminal) Hope it helps. 5. Or the main reason can be, you may not set the path for MySQL bin folder in either system variables or user variables..
@harshith_takkala3 жыл бұрын
Was your error resolved?
@shreyashdhane62343 жыл бұрын
@@harshith_takkala I had the same error, I tried "Run JAVA". it's working fine now😂 thanks, man.
@reemanfahaad2 жыл бұрын
what is the command for creating new database?
@harshith_takkala2 жыл бұрын
CREATE DATABASE You can refer to documentation or w3 schools for more information
@iam_a_sad_khan3 жыл бұрын
I am getting an error. java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver. Can you help me out?
@harshith_takkala3 жыл бұрын
Please refer to the pinned comment.✌
@iam_a_sad_khan3 жыл бұрын
@@harshith_takkala Thanks, I was compiling with javac earlier and it was giving me this error but then I compiled it with the "run java" in vs code and it worked. Thanks again.
@kushalbarot49912 жыл бұрын
@@iam_a_sad_khan kaise kia bhai mujhe b smjao
@faithfillstories3 жыл бұрын
Broh I didn't got the file name javaprojects on the left side
@harshith_takkala3 жыл бұрын
It will come when you open VS code from projects root directory. Example: Projectname-> {src, lib, etc...}.
@harshmavani242 жыл бұрын
can you tell me please how to hide user credential or encrypt database connectivity root or password with help of . properties file
@harshith_takkala2 жыл бұрын
I too dont know May be you can search for that in maven repository and download the jar file and import it. Else, you can use a maven project setup to install automatically
@harshmavani242 жыл бұрын
@@harshith_takkala can you provide that repo ?
@harshith_takkala2 жыл бұрын
@@harshmavani24 yeah, just search maven central repository and you can get the maven configurations. You can also download jar files over there I guess.
@harshith_takkala2 жыл бұрын
@@harshmavani24 you can refer to my maven playlist where I made a simple maven project that contains setup of project jn vscode. There we can add our required configurations to download automatically with the help of xml loading.
@torrescle4 жыл бұрын
The vs code for Fedora 33 do not allow me to select any folder or .jar file :(
@harshith_takkala4 жыл бұрын
I dont have any idea about that operating system.
@deliveryboy7862 ай бұрын
mera java project wala option nhi aa rha hai vs code mai kya kru?
@ZoomerApp6 ай бұрын
Well, thanks so much man. It actually worked for me!
@Bhavana_Bora3 жыл бұрын
I'm unable to locate these refrential libraries,Please help
@harshith_takkala3 жыл бұрын
When we create a java project, "JAVA PROJECT" named a world space is created. Under this space, there is a directory called "Referenced Libraries". It takes little bit time to create the workspace in VS code. If the work space is not created, then close the whole and open the java project again with VS code. Then after workspace creation has done, import the jar files.
@aayushsolanki26904 жыл бұрын
showing error class not found java.lang.ClassNotFoundException: com.mysql.jdbc.Driver please help
@harshith_takkala4 жыл бұрын
May be: 1. You haven't imported the correct jar file (jdbc driver from MySQL Installation) 2. Try to clear the workspace cache in VS Code. (don't know how but sometimes VS Code recommends me to do by a notification) 3. Restart the whole procedure... 4. Replace the statement "Class.forName("com.mysql.jdbc.Driver");" to "Class.forName("com.mysql.cj.jdbc.Driver");" (suggestion given by VS Code terminal) Hope it helps.
@harshith_takkala4 жыл бұрын
Or the main reason can be, you may not set the path for MySQL bin folder in either system variables or user variables..
@vedgurnule2 жыл бұрын
I cannot find the Connector J folder even after installing twice
@harshith_takkala2 жыл бұрын
Not able to find J connector in MySQL installation ? I think you havent checked it while installation Just edit the installation using "installer-community"
@vedgurnule2 жыл бұрын
@@harshith_takkala I found it but it is in Program Files (x86) Folder Will that cause an issue?
@harshith_takkala2 жыл бұрын
@@vedgurnule no, it is right, MySQL stores some of its files there also
@vedgurnule2 жыл бұрын
@@harshith_takkala ok I thank you for the prompt reply
@jinside82793 жыл бұрын
how to run this prject on browser
@harshith_takkala3 жыл бұрын
I think you are trying to combine the JSP, servlets and Mysql. If I am right, then i have a playlist. Please check it.
@parthjaiswal61513 жыл бұрын
nice learning from a fellow vitian
@harshith_takkala3 жыл бұрын
Hii🙂
@nagraj89493 жыл бұрын
Says unknown database. How to resolve this error
@harshith_takkala3 жыл бұрын
1. May be you dont have the database with the given name 2. May be do you have database with that name in the port running (3600)
@ИнкарЖолдыбай-ч9ж3 ай бұрын
thank you so much
@padhaiparcharcha3 жыл бұрын
Can I download separate jdbc driver file?
@harshith_takkala3 жыл бұрын
You can download it if you are already installed with basic MySQL installation. You can run "MySQL installer- Community" and add Connector/J through which dependency will be downloaded into your MySQL installation. OR Visit this: dev.mysql.com/downloads/connector/j/ Choose archives, choose "platform independent" as the Operating system and there you get a ZIP file (and also TAR available). Unzip and you get the jar file.
@padhaiparcharcha3 жыл бұрын
@@harshith_takkala in which folder I should add this jar file?
@harshith_takkala3 жыл бұрын
@@padhaiparcharcha just download the zip file, extract it and remember the location and then follow the same as I did from 07:27 ✌
@padhaiparcharcha3 жыл бұрын
@@harshith_takkala how to enable options of refrenced library?
@harshith_takkala3 жыл бұрын
@@padhaiparcharcha in the "Java projects" named explored, you will find it. You have to open the VS code again from project root directory to see that.
@nikhiljoshi94403 жыл бұрын
Showing error: Failed to launch debuggee in terminal. And asking to open launch.json
@harshith_takkala3 жыл бұрын
Hey, my debugging is going fine, I have tried. This is how the launch.json must look similarly: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "java", "name": "Launch Current File", "request": "launch", "mainClass": "${file}" }, { "type": "java", "name": "Launch App", "request": "launch", "mainClass": "App", "projectName": "database_495139a9" } ] } This is for the jdbc code in App.java, where project name is "database". The "mainClass" attribute is created after you first run or debug the project. Hope it helps
@nikhiljoshi94403 жыл бұрын
@@harshith_takkala I turned off Compatibility mode and now it's working. But when I am connecting mysql database to VSCode (not for jdbc) it's showing that couldn't find any database driver. Oracle MySql is already installed in my pc and I want to connect it to VSCode. I have also installed MySql Management tool in VSCode. The problem is that VSCode couldn't find mysql driver. I have tried my best and checked class path and online solution (Google and KZbin) but all in vain. www.dropbox.com/s/8h713dirqax0f1v/2021-03-01-16-32-50.mp4?dl=0
@harshith_takkala3 жыл бұрын
@@nikhiljoshi9440 oh! I dont know that there is a concept of just connecting vs code with mysql. I will check into it. Thanks for the information 🙂
@nikhiljoshi94403 жыл бұрын
@@harshith_takkala ok check the video I have mentioned in above comment.
@harshith_takkala3 жыл бұрын
Yeah I got the video link in the notifications but not in the youtube comments.. Why like that I have seen your screen recording, and i will let u know soon. Edit: oh I got it thanks, I got it.🙂🙂 I have seen it and understood. But for this video I havent used any vs code extension specifically for mysql I will see that for sure, thanks for the video
@deepakchauhn15122 жыл бұрын
i want that notepad file can you share
@harshith_takkala2 жыл бұрын
That's just for the reference buddy. It's just a boiler plate code for any JDBC programs in initial stages. You can find the same in online JDBS tutorials!
@yugansh43563 жыл бұрын
Thank you so much you deserve much subscriber
@CelineCardoso-n2p21 күн бұрын
can you paste the code you used in the comments?
@FFODPАй бұрын
You helped me ... thank man
@supraja7193 жыл бұрын
Thank you so much for the vedio it is useful, and may i know how we can create a database of our own and also table
@harshith_takkala3 жыл бұрын
Yes we can, I think you are ready with the MySQL. You can do that either by using command line client or Workbench.
@supraja7193 жыл бұрын
@@harshith_takkalayeah i got it Command : create database; 😅
@princechoudhary43352 жыл бұрын
Are you from VIT?
@harshith_takkala2 жыл бұрын
Yeah, you too ?
@princechoudhary43352 жыл бұрын
@@harshith_takkala yeah Your lab cat and labfat databases Lol😂
@harshith_takkala2 жыл бұрын
@@princechoudhary4335 yeah bro 😅😅
@LightWalk3r2 жыл бұрын
Thank you, this was super helpful
@SpringBoot3.03 жыл бұрын
Thanks bro Awesome Tutorial!
@AmanKumar-wu3ej Жыл бұрын
Thnaku bro you are life saver
@carladomingomiquel47447 ай бұрын
you are the best!!!! thank you so much!
@FERRUM-ix5yk2 ай бұрын
What caste are you from, dude?
@harshith_takkala2 ай бұрын
@@FERRUM-ix5yk why buddy ?
@OsomWay3 жыл бұрын
You are a monster. Thank you bro!
@harshith_takkala3 жыл бұрын
😂
@yunusshaikh74783 жыл бұрын
thank you so much . It really helped me
@anmolverma29112 жыл бұрын
Thanks 🔥🔥🔥🚀👍
@krishraj78085 ай бұрын
Thanks a lot man 🤝. I was struggling in running this program for 4-5 hours. Don't know where to put the .jar file and getting an error every time. (❁´◡`❁)
@ahmadshodikin2622 жыл бұрын
thanks, it really help :)
@drxninja7452 жыл бұрын
video was helpful, but lol u dont have to hide ur sql password, cuz no one can misuse it nor access it
@harshith_takkala2 жыл бұрын
ha locally its not possible, but if i deploy this project, it can be misused.
@toriljain2711 Жыл бұрын
thank you bhaiya
@shivamseth28513 жыл бұрын
dhanyawad :-)
@tejasbele14564 жыл бұрын
Thank you so much...
@vidyatrimbake4802 жыл бұрын
Great!!🌻
@nitigyajoshi46583 жыл бұрын
thanks a lot sir
@hilmanaziz3 жыл бұрын
another great video
@akramchaudhary44033 жыл бұрын
Kya yr thoda Tezz bol leta bhai ghnta kuch sunai nhi de rha
@harshith_takkala3 жыл бұрын
Ha bhai sure, Baat ye hai ki mere pass mic ka set nahi hei
@t.a.f.67363 жыл бұрын
Thank you!
@nishankpriydarshi52003 жыл бұрын
record to dhang se kar lete bhai
@harshith_takkala3 жыл бұрын
Ha bhai. Sorry for that. Ab se videos sahi honge
@nishankpriydarshi52003 жыл бұрын
@@harshith_takkala Nice 😀
@AryanKumar-vk1ex5 ай бұрын
in MYSQL connector file is not showing
@harshith_takkala5 ай бұрын
@@AryanKumar-vk1ex if not there, then from mysql installer you have to install it. I guess you havent checked the checkbox in first time installation.