When I java with VScode, I sometimes get hooked. This time, I wanted to use jdbc of mysql to handle DB (mysql).
java.long.ClassNotFoundException: com.mysql.cj.jdbc.Driver
I couldn't stop the error. A full day to resolve (tears)
In VScode, the [java Dependency Viewer] is used to install the external jar file, so when installing [Project Manager for java] with the VScode extension (for jdk8, the instool version is 0.9.0 or older. Please use it).
Then, the following memorandum!
Select the java file in ① Select ② Explorer menu [...] ③ If jdk8-> [java Dependencies] For jdk11-> [java Project] If you check Like ④ [Java PROJECTS] \ (jdk11) or [Java DEPANDENCIES] \ (jdk8) Is displayed, open those directories Display [Referenced Libraries] Click [+] in ⑤!
Then Since the folder opens so that you can specify the external file you want to use Specify the desired file and finish!
How is it! It took time!
Recommended Posts