0

I'm new to Maven and NetBeans. I can run my project just fine from within NetBeans. My problems are currently starting after I "Clean and Build" to distribute test versions of my application. I was under the impression that if the jdbc was declared in the Dependencies section of the POM.xml, that would translate to the built version of the application, but when I run

java -jar <application>.jar

I get a

java.lang.ClassNotFoundException

Basically, I want this to go away. I've tried moving a manually downloaded version of the sqlite-jdbc-3.7.2.jar to various different places within the project files, then doing a Clean and Build, with no luck. I've also experimented with "addClasspath" and "additionalClasspathElements" tags in the POM, again to no avail. I have also yet to find clear enough answers to how classpath in java even really works, as well as how it works with maven.

If I was to copy my source from this project to a non-maven project and import the .jar's as I need them, would this be easier?

Atul KS
  • 908
  • 11
  • 21
  • Post the complete exception message – Basil Bourque Jun 16 '21 at 20:07
  • @GaëlJ I think it may have. If I'm understanding correctly, the tags to copy the dependencies are what I would be missing. I will try it out and see how far it gets me. This may be a sign that its time to have a proper sit down with maven. Appreciate the help! – Joshua Murray Jun 17 '21 at 11:54

0 Answers0