Issue
So, I was looking to solve this error java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver, but idk why my folder configuration is different from all the post i've found.
The steps i'm doing:
Tools>Libraries>Add jar/Folder
href="https://i.stack.imgur.com/mkGAM.jpg" rel="nofollow noreferrer">
After that I don't know what to do there is like 50 different folders and I've added the libreries to Java DB Driver and even added a folder called Oracle but i'm nowhere near to make this work.
I even installed older versions of netbeans but I get the same window and options when it is supposed to just let me right click on project then Library>Add jar/Folder as mentioned here.
Edit: This is a desktop project, I'm using Netbeans 12.4 (but I also downloaded version 12.3, 12.0), the project was created from 0 with Netbeans 12.4 with these steps:
New project>Java with Maven>Java application>Change name and other information>Finish
After that just added a package then a JFrame, JPanel and a button and tried to add the ojdbc8.jar
I configured the service as @Trashgod said and was able to see the tables, views, etc but still got the same error.
Solution
What worked for me was what @andrewJames said, editing POM.xml by adding the tag <dependencies> ... </dependencies>
which was not automatically created by Netbeans and inside that adding the xml from Maven Central repository ojdbc8 (or whatever version you need), after that just run the project and it will download automatically the driver.
I'm keeping the question because as a new user of Netbeans, if the program doesn't add important tags like <dependencies> ... </dependencies>
and you just come and try to add the <dependency> ... </dependency>
tag which is suggested in many questions, but none of them tells you that you should have such a tag in the first place, even if its correct you will be getting an error.
Answered By - Ezequiel
Answer Checked By - Timothy Miller (JavaFixing Admin)